aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-06-01 20:20:39 +0200
committerRiccardo Spagni <ric@spagni.net>2019-06-01 20:20:39 +0200
commitfccfc1aa250d23f6693b51e585d26245a4434fed (patch)
tree63c3bd41b11011403cbb2e385a91bb6a6e169fd6 /src
parentMerge pull request #5548 (diff)
parentFix #5553 (diff)
downloadmonero-fccfc1aa250d23f6693b51e585d26245a4434fed.tar.xz
Merge pull request #5555
b6830db2 Fix #5553 (Howard Chu)
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/blockchain.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 39c9f8695..2e7f6247b 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -1373,7 +1373,8 @@ bool Blockchain::create_block_template(block& b, const crypto::hash *from_block,
// just as we compare it, we'll just use a slightly old template, but
// this would be the case anyway if we'd lock, and the change happened
// just after the block template was created
- if (!memcmp(&miner_address, &m_btc_address, sizeof(cryptonote::account_public_address)) && m_btc_nonce == ex_nonce && m_btc_pool_cookie == m_tx_pool.cookie()) {
+ if (!memcmp(&miner_address, &m_btc_address, sizeof(cryptonote::account_public_address)) && m_btc_nonce == ex_nonce
+ && m_btc_pool_cookie == m_tx_pool.cookie() && m_btc.prev_id == get_tail_id()) {
MDEBUG("Using cached template");
m_btc.timestamp = time(NULL); // update timestamp unconditionally
b = m_btc;