aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/command_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-10-22 15:28:08 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-10-25 18:41:54 +0000
commita4dc575ccba8348886ed19594a16f5a7242f8fe6 (patch)
treee6afd9cd4b734b336e74af84931aa45a87f9e3eb /src/daemon/command_server.cpp
parentMerge pull request #5357 (diff)
downloadmonero-a4dc575ccba8348886ed19594a16f5a7242f8fe6.tar.xz
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/daemon/command_server.cpp')
-rw-r--r--src/daemon/command_server.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/daemon/command_server.cpp b/src/daemon/command_server.cpp
index b00e253c7..8ec690631 100644
--- a/src/daemon/command_server.cpp
+++ b/src/daemon/command_server.cpp
@@ -322,6 +322,12 @@ t_command_server::t_command_server(
, "URL of a 'bootstrap' remote daemon that the connected wallets can use while this daemon is still not fully synced.\n"
"Use 'auto' to enable automatic public nodes discovering and bootstrap daemon switching"
);
+ m_command_lookup.set_handler(
+ "flush_cache"
+ , std::bind(&t_command_parser_executor::flush_cache, &m_parser, p::_1)
+ , "flush_cache bad-txs"
+ , "Flush the specified cache(s)."
+ );
}
bool t_command_server::process_command_str(const std::string& cmd)