mirror of
https://github.com/monero-project/monero.git
synced 2025-05-02 09:56:07 -04:00
rpc: add a flush_cache RPC
This allows flushing internal caches (for now, the bad tx cache, which will allow debugging a stuck monerod after it has failed to verify a transaction in a block, since it would otherwise not try again, making subsequent log changes pointless)
This commit is contained in:
parent
960c215801
commit
a4dc575ccb
11 changed files with 103 additions and 7 deletions
|
@ -516,16 +516,16 @@ class Daemon(object):
|
|||
}
|
||||
return self.rpc.send_json_rpc_request(prune_blockchain)
|
||||
|
||||
def get_block_rate(self, seconds = [3600]):
|
||||
get_block_rate = {
|
||||
'method': 'get_block_rate',
|
||||
def flush_cache(self, bad_txs = False):
|
||||
flush_cache = {
|
||||
'method': 'flush_cache',
|
||||
'params': {
|
||||
'seconds': seconds,
|
||||
'bad_txs': bad_txs,
|
||||
},
|
||||
'jsonrpc': '2.0',
|
||||
'jsonrpc': '2.0',
|
||||
'id': '0'
|
||||
}
|
||||
return self.rpc.send_json_rpc_request(get_block_rate)
|
||||
return self.rpc.send_json_rpc_request(flush_cache)
|
||||
|
||||
def rpc_access_info(self, client):
|
||||
rpc_access_info = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue