rpc: add bad-blocks to flush_cache RPC

Flushes m_invalid_blocks in Blockchain.
This commit is contained in:
moneromooo-monero 2019-12-02 18:51:28 +00:00
parent 411f1b0ee3
commit 5985c5afe8
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
10 changed files with 47 additions and 7 deletions

View file

@ -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__);