aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-03-05 19:12:05 +0200
committerRiccardo Spagni <ric@spagni.net>2018-03-05 19:12:05 +0200
commitabcdb7b5c4c262463ef01c73cdd42e0e8eaa432d (patch)
treecbc2370831f261e9f06723c7d31d93fcafd6b088 /src/cryptonote_core/blockchain.cpp
parentMerge pull request #3307 (diff)
parentblockchain: fix random sync failures (diff)
downloadmonero-abcdb7b5c4c262463ef01c73cdd42e0e8eaa432d.tar.xz
Merge pull request #3308
6f8779d2 blockchain: fix random sync failures (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 88ed409bf..d88cc1bf9 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -3564,6 +3564,7 @@ bool Blockchain::add_new_block(const block& bl_, block_verification_context& bvc
LOG_PRINT_L3("block with id = " << id << " already exists");
bvc.m_already_exists = true;
m_db->block_txn_stop();
+ m_blocks_txs_check.clear();
return false;
}
@@ -3573,7 +3574,9 @@ bool Blockchain::add_new_block(const block& bl_, block_verification_context& bvc
//chain switching or wrong block
bvc.m_added_to_main_chain = false;
m_db->block_txn_stop();
- return handle_alternative_block(bl, id, bvc);
+ bool r = handle_alternative_block(bl, id, bvc);
+ m_blocks_txs_check.clear();
+ return r;
//never relay alternative blocks
}