aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/command_parser_executor.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/daemon/command_parser_executor.cpp
parent9a995f338a5a3402449b5028ae0ef08ed149fc0b (diff)
parenta4dc575ccba8348886ed19594a16f5a7242f8fe6 (diff)
downloadmonzero-core-f253bf384674ae8a2f1d0652cb27ff17c7fc1fc1.tar.gz
monzero-core-f253bf384674ae8a2f1d0652cb27ff17c7fc1fc1.tar.xz
monzero-core-f253bf384674ae8a2f1d0652cb27ff17c7fc1fc1.zip
Merge pull request #6007
a4dc575 rpc: add a flush_cache RPC (moneromooo-monero)
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
-rw-r--r--src/daemon/command_parser_executor.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp
index 8e78f3bd1..b827221f6 100644
--- a/src/daemon/command_parser_executor.cpp
+++ b/src/daemon/command_parser_executor.cpp
@@ -844,4 +844,16 @@ bool t_command_parser_executor::set_bootstrap_daemon(const std::vector<std::stri
args_count > 2 ? args[2] : std::string());
}
+bool t_command_parser_executor::flush_cache(const std::vector<std::string>& args)
+{
+ if (args.empty())
+ goto show_list;
+ if (args[0] == "bad-txs")
+ return m_executor.flush_cache(true);
+
+show_list:
+ std::cout << "Cache type needed: bad-txs" << std::endl;
+ return true;
+}
+
} // namespace daemonize