diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp index c19defa..df2c5d0 100644 --- a/src/cryptonote_core/cryptonote_tx_utils.cpp +++ b/src/cryptonote_core/cryptonote_tx_utils.cpp @@ -498,7 +498,7 @@ namespace cryptonote CHECK_AND_ASSERT_THROW_MES(destination.payment_id == carrot::null_payment_id, "make_single_enote_carrot_coinbase_transaction_v1: integrated addresses are not allowed in miner transactions"); - uint64_t stake_reward = block_reward / 5; + const uint64_t stake_reward = has_active_stakes ? (block_reward / 5) : 0; const carrot::CarrotPaymentProposalV1 payment_proposal{ .destination = destination, @@ -543,6 +543,7 @@ namespace cryptonote tx = carrot::store_carrot_to_coinbase_transaction_v1(enotes, extra_nonce, cryptonote::transaction_type::MINER, height); tx.version = (hard_fork_version >= HF_VERSION_ENABLE_TOKENS) ? TRANSACTION_VERSION_ENABLE_TOKENS : TRANSACTION_VERSION_CARROT; tx.amount_burnt = stake_reward; + MERROR("construct_miner_tx: carrot branch final height=" << height << ", has_active_stakes=" << has_active_stakes << ", block_reward=" << block_reward << ", amount_burnt=" << tx.amount_burnt << ", miner_amount=" << payment_proposal.amount); tx.invalidate_hashes(); } catch (const std::exception &e)