From 1649a7f111a159fbb84db12b2d7fa71e6ea0ef5d Mon Sep 17 00:00:00 2001 From: victor-tucci Date: Thu, 8 Jun 2023 12:33:30 +0530 Subject: [PATCH] minor bug fix in minor_reward --- src/rpc/core_rpc_server.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index f333068c7f..1de27fcfcc 100755 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -1835,7 +1835,8 @@ namespace cryptonote { namespace rpc { response.cumulative_difficulty = m_core.get_blockchain_storage().get_db().get_block_cumulative_difficulty(height); response.block_weight = m_core.get_blockchain_storage().get_db().get_block_weight(height); response.reward = get_block_reward(blk); - response.miner_reward = blk.miner_tx.vout[0].amount; + if(blk.nonce != 0) + response.miner_reward = blk.miner_tx.vout[0].amount; response.block_size = response.block_weight = m_core.get_blockchain_storage().get_db().get_block_weight(height); response.num_txes = blk.tx_hashes.size(); if (fill_pow_hash)