diff options
| author | Riccardo Spagni <ric@spagni.net> | 2017-04-24 10:41:31 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2017-04-24 10:41:32 +0200 |
| commit | acbe0b4849409b82d94a063dec8962e74f703b4e (patch) | |
| tree | f259e7398d00de20939353df9d2fdda0b050cc1d /src/cryptonote_basic/miner.cpp | |
| parent | a059e91d7fbdbf8745e48dd1c86e336483ff778c (diff) | |
| parent | bff90264b8b4e3869aad92e09591f2a579504d7e (diff) | |
| download | monzero-core-acbe0b4849409b82d94a063dec8962e74f703b4e.tar.gz monzero-core-acbe0b4849409b82d94a063dec8962e74f703b4e.tar.xz monzero-core-acbe0b4849409b82d94a063dec8962e74f703b4e.zip | |
Merge pull request #1938
bff90264 Add expected total reward to RPC "getblocktemplate". Only works from V5 fork onward - returns 0 before that block. (assylias)
Diffstat (limited to 'src/cryptonote_basic/miner.cpp')
| -rw-r--r-- | src/cryptonote_basic/miner.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index 9f2da8a94..eeb7b6094 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -122,13 +122,15 @@ namespace cryptonote block bl = AUTO_VAL_INIT(bl); difficulty_type di = AUTO_VAL_INIT(di); uint64_t height = AUTO_VAL_INIT(height); + uint64_t expected_reward; //only used for RPC calls - could possibly be useful here too? + cryptonote::blobdata extra_nonce; if(m_extra_messages.size() && m_config.current_extra_message_index < m_extra_messages.size()) { extra_nonce = m_extra_messages[m_config.current_extra_message_index]; } - if(!m_phandler->get_block_template(bl, m_mine_address, di, height, extra_nonce)) + if(!m_phandler->get_block_template(bl, m_mine_address, di, height, expected_reward, extra_nonce)) { LOG_ERROR("Failed to get_block_template(), stopping mining"); return false; |
