aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-10-25 14:20:20 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-10-25 14:20:20 -0500
commitf253bf384674ae8a2f1d0652cb27ff17c7fc1fc1 (patch)
tree81bc979a941aecb93600e900ddf6a7bb5a81fc4b /src/rpc/core_rpc_server.cpp
parentMerge pull request #6023 (diff)
parentrpc: add a flush_cache RPC (diff)
downloadmonero-f253bf384674ae8a2f1d0652cb27ff17c7fc1fc1.tar.xz
Merge pull request #6007
a4dc575 rpc: add a flush_cache RPC (moneromooo-monero)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 8882df5d7..5a6a395bc 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -2995,10 +2995,18 @@ namespace cryptonote
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
+ bool core_rpc_server::on_flush_cache(const COMMAND_RPC_FLUSH_CACHE::request& req, COMMAND_RPC_FLUSH_CACHE::response& res, epee::json_rpc::error& error_resp, const connection_context *ctx)
+ {
+ RPC_TRACKER(flush_cache);
+ if (req.bad_txs)
+ m_core.flush_bad_txs_cache();
+ res.status = CORE_RPC_STATUS_OK;
+ return true;
+ }
+ //------------------------------------------------------------------------------------------------------------------------------
bool core_rpc_server::on_rpc_access_submit_nonce(const COMMAND_RPC_ACCESS_SUBMIT_NONCE::request& req, COMMAND_RPC_ACCESS_SUBMIT_NONCE::response& res, epee::json_rpc::error& error_resp, const connection_context *ctx)
{
RPC_TRACKER(rpc_access_submit_nonce);
-
bool r;
if (use_bootstrap_daemon_if_necessary<COMMAND_RPC_ACCESS_SUBMIT_NONCE>(invoke_http_mode::JON, "rpc_access_submit_nonce", req, res, r))
return r;