From 5985c5afe8051ef9933212e62293ece3634a5024 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 2 Dec 2019 18:51:28 +0000 Subject: rpc: add bad-blocks to flush_cache RPC Flushes m_invalid_blocks in Blockchain. --- src/cryptonote_core/blockchain.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/cryptonote_core/blockchain.cpp') diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index d22158dfc..733ac5bcd 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2534,6 +2534,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__); -- cgit v1.2.3