diff options
author | assylias <yann@assylias.com> | 2017-03-28 15:55:38 +0100 |
---|---|---|
committer | assylias <yann@assylias.com> | 2017-04-19 18:28:16 +0100 |
commit | bff90264b8b4e3869aad92e09591f2a579504d7e (patch) | |
tree | 5243440af48edc6f623baf3b16cdf4773797b931 /src/cryptonote_core/tx_pool.cpp | |
parent | Merge pull request #1956 (diff) | |
download | monero-bff90264b8b4e3869aad92e09591f2a579504d7e.tar.xz |
Add expected total reward to RPC "getblocktemplate".
Only works from V5 fork onward - returns 0 before that block.
Diffstat (limited to 'src/cryptonote_core/tx_pool.cpp')
-rw-r--r-- | src/cryptonote_core/tx_pool.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index 37b6fb4b0..f78f673c7 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -613,7 +613,7 @@ namespace cryptonote } //--------------------------------------------------------------------------------- //TODO: investigate whether boolean return is appropriate - bool tx_memory_pool::fill_block_template(block &bl, size_t median_size, uint64_t already_generated_coins, size_t &total_size, uint64_t &fee, uint8_t version) + bool tx_memory_pool::fill_block_template(block &bl, size_t median_size, uint64_t already_generated_coins, size_t &total_size, uint64_t &fee, uint64_t &expected_reward, uint8_t version) { // Warning: This function takes already_generated_ // coins as an argument and appears to do nothing @@ -705,6 +705,7 @@ namespace cryptonote LOG_PRINT_L2(" added, new block size " << total_size << "/" << max_total_size << ", coinbase " << print_money(best_coinbase)); } + expected_reward = best_coinbase; LOG_PRINT_L2("Block template filled with " << bl.tx_hashes.size() << " txes, size " << total_size << "/" << max_total_size << ", coinbase " << print_money(best_coinbase) << " (including " << print_money(fee) << " in fees)"); |