aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-02-28 19:36:16 -0800
committerAlexander Blair <snipa@jagtech.io>2020-02-28 19:36:16 -0800
commit4da37daf67976e48d6fc75f2a5a6f5858d227815 (patch)
treeef7cf33b245ddf3e9325639a2dfb49baf6a5d82c /src/cryptonote_core/blockchain.cpp
parentMerge pull request #6205 (diff)
parentrpc: add bad-blocks to flush_cache RPC (diff)
downloadmonero-4da37daf67976e48d6fc75f2a5a6f5858d227815.tar.xz
Merge pull request #6211
5985c5af rpc: add bad-blocks to flush_cache RPC (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 78893fdf2..a8683a531 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -2541,6 +2541,13 @@ bool Blockchain::add_block_as_invalid(const block_extended_info& bei, const cryp
return true;
}
//------------------------------------------------------------------
+void Blockchain::flush_invalid_blocks()
+{
+ LOG_PRINT_L3("Blockchain::" << __func__);
+ CRITICAL_REGION_LOCAL(m_blockchain_lock);
+ m_invalid_blocks.clear();
+}
+//------------------------------------------------------------------
bool Blockchain::have_block(const crypto::hash& id) const
{
LOG_PRINT_L3("Blockchain::" << __func__);