rpc: add bad-blocks to flush_cache RPC
Flushes m_invalid_blocks in Blockchain.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user