aboutsummaryrefslogtreecommitdiff
path: root/utils/python-rpc/framework/daemon.py
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-10-22 15:28:08 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-10-25 18:41:54 +0000
commita4dc575ccba8348886ed19594a16f5a7242f8fe6 (patch)
treee6afd9cd4b734b336e74af84931aa45a87f9e3eb /utils/python-rpc/framework/daemon.py
parentMerge pull request #5357 (diff)
downloadmonero-a4dc575ccba8348886ed19594a16f5a7242f8fe6.tar.xz
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)
Diffstat (limited to '')
-rw-r--r--utils/python-rpc/framework/daemon.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/python-rpc/framework/daemon.py b/utils/python-rpc/framework/daemon.py
index f811535b1..9f7805dc8 100644
--- a/utils/python-rpc/framework/daemon.py
+++ b/utils/python-rpc/framework/daemon.py
@@ -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 = {