diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-29 19:54:11 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-09-17 11:38:20 +0000 |
commit | a71d91cecf02b8071d6c5318655aac7cf1075df5 (patch) | |
tree | aca165c02579af9299a790fc36d7bc7d6c89d858 /utils/python-rpc/framework/wallet.py | |
parent | functional_tests: add multisig state tests (diff) | |
download | monero-a71d91cecf02b8071d6c5318655aac7cf1075df5.tar.xz |
functional_tests: add test for mining via wallet
Diffstat (limited to '')
-rw-r--r-- | utils/python-rpc/framework/wallet.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py index cfffb32a8..713ddcca8 100644 --- a/utils/python-rpc/framework/wallet.py +++ b/utils/python-rpc/framework/wallet.py @@ -781,6 +781,29 @@ class Wallet(object): } return self.rpc.send_json_rpc_request(validate_address) + def start_mining(self, threads_count, do_background_mining = False, ignore_battery = False): + start_mining = { + 'method': 'start_mining', + 'jsonrpc': '2.0', + 'params': { + 'threads_count': threads_count, + 'do_background_mining': do_background_mining, + 'ignore_battery': ignore_battery, + }, + 'id': '0' + } + return self.rpc.send_json_rpc_request(start_mining) + + def stop_mining(self): + stop_mining = { + 'method': 'stop_mining', + 'jsonrpc': '2.0', + 'params': { + }, + 'id': '0' + } + return self.rpc.send_json_rpc_request(stop_mining) + def get_version(self): get_version = { 'method': 'get_version', |