aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-12-02 18:51:28 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-12-02 18:53:30 +0000
commit5985c5afe8051ef9933212e62293ece3634a5024 (patch)
treea3d54b1111c7f9d346c94900613943f2c84ca364 /src/rpc
parentMerge pull request #6174 (diff)
downloadmonero-5985c5afe8051ef9933212e62293ece3634a5024.tar.xz
rpc: add bad-blocks to flush_cache RPC
Flushes m_invalid_blocks in Blockchain.
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/core_rpc_server.cpp2
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 9117b5b3a..2438b3045 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -3004,6 +3004,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 855ea854c..c3ee866bb 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -88,7 +88,7 @@ namespace cryptonote
// advance which version they will stop working with
// Don't go over 32767 for any of these
#define CORE_RPC_VERSION_MAJOR 3
-#define CORE_RPC_VERSION_MINOR 0
+#define CORE_RPC_VERSION_MINOR 1
#define MAKE_CORE_RPC_VERSION(major,minor) (((major)<<16)|(minor))
#define CORE_RPC_VERSION MAKE_CORE_RPC_VERSION(CORE_RPC_VERSION_MAJOR, CORE_RPC_VERSION_MINOR)
@@ -2559,9 +2559,11 @@ namespace cryptonote
struct request_t
{
bool bad_txs;
+ bool bad_blocks;
BEGIN_KV_SERIALIZE_MAP()
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;