aboutsummaryrefslogtreecommitdiff
path: root/tests/functional_tests/test_framework/daemon.py
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-15 17:39:07 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-21 19:26:49 +0000
commit18a2ed4518da8962ad30d0175ddeb7a6bc28c0f8 (patch)
tree7f4a2a8f66b7e9e78281d8b36913c78a161608dd /tests/functional_tests/test_framework/daemon.py
parentfunctional_tests: add wallet address/subaddress RPC tests (diff)
downloadmonero-18a2ed4518da8962ad30d0175ddeb7a6bc28c0f8.tar.xz
functional_tests: add basic mining tests
Diffstat (limited to 'tests/functional_tests/test_framework/daemon.py')
-rw-r--r--tests/functional_tests/test_framework/daemon.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/functional_tests/test_framework/daemon.py b/tests/functional_tests/test_framework/daemon.py
index c7619a434..6088fc0df 100644
--- a/tests/functional_tests/test_framework/daemon.py
+++ b/tests/functional_tests/test_framework/daemon.py
@@ -149,3 +149,22 @@ class Daemon(object):
'nblocks' : nblocks,
}
return self.rpc.send_request("/pop_blocks", pop_blocks)
+
+ def start_mining(self, miner_address, threads_count = 0, do_background_mining = False, ignore_battery = False):
+ start_mining = {
+ 'miner_address' : miner_address,
+ 'threads_count' : threads_count,
+ 'do_background_mining' : do_background_mining,
+ 'ignore_battery' : ignore_battery,
+ }
+ return self.rpc.send_request('/start_mining', start_mining)
+
+ def stop_mining(self):
+ stop_mining = {
+ }
+ return self.rpc.send_request('/stop_mining', stop_mining)
+
+ def mining_status(self):
+ mining_status = {
+ }
+ return self.rpc.send_request('/mining_status', mining_status)