Split test update thread.

This commit is contained in:
tecnovert
2020-12-13 17:11:18 +02:00
parent 269d10aeda
commit 325a846f47
4 changed files with 55 additions and 19 deletions

View File

@@ -237,18 +237,18 @@ def callnoderpc(node_id, method, params=[], wallet=None, base_rpc_port=BASE_RPC_
def run_coins_loop(cls):
global stop_test
while not stop_test:
if cls.btc_addr is not None:
btcRpc('generatetoaddress 1 {}'.format(cls.btc_addr))
if cls.xmr_addr is not None:
callrpc_xmr_na(XMR_BASE_RPC_PORT + 1, 'generateblocks', {'wallet_address': cls.xmr_addr, 'amount_of_blocks': 1})
time.sleep(1.0)
try:
if cls.btc_addr is not None:
btcRpc('generatetoaddress 1 {}'.format(cls.btc_addr))
if cls.xmr_addr is not None:
callrpc_xmr_na(XMR_BASE_RPC_PORT + 1, 'generateblocks', {'wallet_address': cls.xmr_addr, 'amount_of_blocks': 1})
except Exception as e:
logging.warning('run_coins_loop ' + str(e))
def run_loop(cls):
global stop_test
while not stop_test:
for c in cls.swap_clients:
c.update()