diff options
author | Howard Chu <hyc@symas.com> | 2021-11-21 01:24:10 +0000 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2021-11-21 01:24:10 +0000 |
commit | a4ebec9afb6cbf92ea7bcf1a3d2babdf53e9e612 (patch) | |
tree | 99f33e7cffa628c76e0ee20cc74158aeedb3ae1b /utils/python-rpc/framework | |
parent | Add calcpow RPC (diff) | |
download | monero-a4ebec9afb6cbf92ea7bcf1a3d2babdf53e9e612.tar.xz |
Add python method
Diffstat (limited to '')
-rw-r--r-- | utils/python-rpc/framework/daemon.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/python-rpc/framework/daemon.py b/utils/python-rpc/framework/daemon.py index 435459f6d..397000b68 100644 --- a/utils/python-rpc/framework/daemon.py +++ b/utils/python-rpc/framework/daemon.py @@ -61,6 +61,20 @@ class Daemon(object): } return self.rpc.send_json_rpc_request(get_miner_data) + def calc_pow(self, major_version, height, block_blob, seed_hash = ''): + calc_pow = { + 'method': 'calc_pow', + 'params': { + 'major_version': major_version, + 'height': height, + 'block_blob' : block_blob, + 'seed_hash' : seed_hash, + }, + 'jsonrpc': '2.0', + 'id': '0' + } + return self.rpc.send_json_rpc_request(calc_pow) + def add_aux_pow(self, blocktemplate_blob, aux_pow, client = ""): add_aux_pow = { 'method': 'add_aux_pow', |