diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-11-08 17:30:18 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2020-08-27 15:13:00 +0000 |
| commit | 9d42649d58a1a898b8fd1be17f42fb6b7ad1f6ee (patch) | |
| tree | d3e5a6a12cbd0bd4d3906afd4d9b350667aceda3 /src/cryptonote_core/cryptonote_core.cpp | |
| parent | c695470cff44e9f7fe0257d99cf94962aff1c4a2 (diff) | |
| download | monzero-core-9d42649d58a1a898b8fd1be17f42fb6b7ad1f6ee.tar.gz monzero-core-9d42649d58a1a898b8fd1be17f42fb6b7ad1f6ee.tar.xz monzero-core-9d42649d58a1a898b8fd1be17f42fb6b7ad1f6ee.zip | |
core: fix mining from a block that's not the current top
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 9a1439c4a..3715440fe 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -226,8 +226,8 @@ namespace cryptonote core::core(i_cryptonote_protocol* pprotocol): m_mempool(m_blockchain_storage), m_blockchain_storage(m_mempool), - m_miner(this, [this](const cryptonote::block &b, uint64_t height, unsigned int threads, crypto::hash &hash) { - return cryptonote::get_block_longhash(&m_blockchain_storage, b, hash, height, threads); + m_miner(this, [this](const cryptonote::block &b, uint64_t height, const crypto::hash *seed_hash, unsigned int threads, crypto::hash &hash) { + return cryptonote::get_block_longhash(&m_blockchain_storage, b, hash, height, seed_hash, threads); }), m_starter_message_showed(false), m_target_blockchain_height(0), @@ -1357,14 +1357,14 @@ namespace cryptonote m_mempool.set_relayed(epee::to_span(tx_hashes), tx_relay); } //----------------------------------------------------------------------------------------------- - bool core::get_block_template(block& b, const account_public_address& adr, difficulty_type& diffic, uint64_t& height, uint64_t& expected_reward, const blobdata& ex_nonce) + bool core::get_block_template(block& b, const account_public_address& adr, difficulty_type& diffic, uint64_t& height, uint64_t& expected_reward, const blobdata& ex_nonce, uint64_t &seed_height, crypto::hash &seed_hash) { - return m_blockchain_storage.create_block_template(b, adr, diffic, height, expected_reward, ex_nonce); + return m_blockchain_storage.create_block_template(b, adr, diffic, height, expected_reward, ex_nonce, seed_height, seed_hash); } //----------------------------------------------------------------------------------------------- - bool core::get_block_template(block& b, const crypto::hash *prev_block, const account_public_address& adr, difficulty_type& diffic, uint64_t& height, uint64_t& expected_reward, const blobdata& ex_nonce) + bool core::get_block_template(block& b, const crypto::hash *prev_block, const account_public_address& adr, difficulty_type& diffic, uint64_t& height, uint64_t& expected_reward, const blobdata& ex_nonce, uint64_t &seed_height, crypto::hash &seed_hash) { - return m_blockchain_storage.create_block_template(b, prev_block, adr, diffic, height, expected_reward, ex_nonce); + return m_blockchain_storage.create_block_template(b, prev_block, adr, diffic, height, expected_reward, ex_nonce, seed_height, seed_hash); } //----------------------------------------------------------------------------------------------- bool core::find_blockchain_supplement(const std::list<crypto::hash>& qblock_ids, bool clip_pruned, NOTIFY_RESPONSE_CHAIN_ENTRY::request& resp) const |
