aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-02-28 19:36:16 -0800
committerAlexander Blair <snipa@jagtech.io>2020-02-28 19:36:16 -0800
commit4da37daf67976e48d6fc75f2a5a6f5858d227815 (patch)
treeef7cf33b245ddf3e9325639a2dfb49baf6a5d82c /src/rpc
parentMerge pull request #6205 (diff)
parentrpc: add bad-blocks to flush_cache RPC (diff)
downloadmonero-4da37daf67976e48d6fc75f2a5a6f5858d227815.tar.xz
Merge pull request #6211
5985c5af rpc: add bad-blocks to flush_cache RPC (moneromooo-monero)
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/core_rpc_server.cpp2
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 409c8a01c..386ef66dc 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -3014,6 +3014,8 @@ namespace cryptonote
RPC_TRACKER(flush_cache);
if (req.bad_txs)
m_core.flush_bad_txs_cache();
+ if (req.bad_blocks)
+ m_core.flush_invalid_blocks();
res.status = CORE_RPC_STATUS_OK;
return true;
}
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index 12b042c7e..89e0a6726 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -2561,10 +2561,12 @@ namespace cryptonote
struct request_t: public rpc_request_base
{
bool bad_txs;
+ bool bad_blocks;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE_PARENT(rpc_request_base)
KV_SERIALIZE_OPT(bad_txs, false)
+ KV_SERIALIZE_OPT(bad_blocks, false)
END_KV_SERIALIZE_MAP()
};
typedef epee::misc_utils::struct_init<request_t> request;