diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-10-22 15:28:08 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-10-25 18:41:54 +0000 |
| commit | a4dc575ccba8348886ed19594a16f5a7242f8fe6 (patch) | |
| tree | e6afd9cd4b734b336e74af84931aa45a87f9e3eb /src/cryptonote_core/cryptonote_core.cpp | |
| parent | 960c2158010d30a375207310a36a7a942b9285d2 (diff) | |
| download | monzero-core-a4dc575ccba8348886ed19594a16f5a7242f8fe6.tar.gz monzero-core-a4dc575ccba8348886ed19594a16f5a7242f8fe6.tar.xz monzero-core-a4dc575ccba8348886ed19594a16f5a7242f8fe6.zip | |
rpc: add a flush_cache RPC
This allows flushing internal caches (for now, the bad tx cache,
which will allow debugging a stuck monerod after it has failed to
verify a transaction in a block, since it would otherwise not try
again, making subsequent log changes pointless)
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 5a303a67e..acb494a49 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -1911,6 +1911,14 @@ namespace cryptonote return true; } //----------------------------------------------------------------------------------------------- + void core::flush_bad_txs_cache() + { + bad_semantics_txes_lock.lock(); + for (int idx = 0; idx < 2; ++idx) + bad_semantics_txes[idx].clear(); + bad_semantics_txes_lock.unlock(); + } + //----------------------------------------------------------------------------------------------- bool core::update_blockchain_pruning() { return m_blockchain_storage.update_blockchain_pruning(); |
