From a7444a2bc92443c788d385b31bacf179e0d15811 Mon Sep 17 00:00:00 2001 From: t1amak Date: Wed, 18 Mar 2026 21:29:01 +0100 Subject: [PATCH] Handle zero-premine genesis separately from emission --- src/cryptonote_core/blockchain.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 8eacb87..3380dbf 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1532,6 +1532,14 @@ bool Blockchain::validate_miner_transaction(const block& b, size_t cumulative_bl } partial_block_reward = false; + if (height == 0) + { + base_reward = PREMINE_AMOUNT; + CHECK_AND_ASSERT_MES(b.miner_tx.amount_burnt == 0, false, "genesis miner transaction must not burn funds"); + CHECK_AND_ASSERT_MES(money_in_use == PREMINE_AMOUNT, false, "genesis miner transaction has incorrect amount"); + return true; + } + switch (version) { case HF_VERSION_BULLETPROOF_PLUS: case HF_VERSION_ENABLE_N_OUTS: