diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-08-29 12:42:46 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-08-29 13:06:02 -0400 |
commit | fa782a308dbe7bc579c122f63c1c65666fc85e91 (patch) | |
tree | b243c96fd5a847162757b293f9e08b0bc559bd74 /test/functional/test_framework/mininode.py | |
parent | b4d33096734d787b0e1d754064039cbb64ce8d61 (diff) |
qa: Use named args in some tests
Diffstat (limited to 'test/functional/test_framework/mininode.py')
-rwxr-xr-x | test/functional/test_framework/mininode.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/test_framework/mininode.py b/test/functional/test_framework/mininode.py index d1ddbbe8ee..034e83aaae 100755 --- a/test/functional/test_framework/mininode.py +++ b/test/functional/test_framework/mininode.py @@ -482,7 +482,7 @@ class P2PDataStore(P2PInterface): self.reject_code_received = message.code self.reject_reason_received = message.reason - def send_blocks_and_test(self, blocks, rpc, success=True, request_block=True, reject_code=None, reject_reason=None, timeout=60): + def send_blocks_and_test(self, blocks, node, *, success=True, request_block=True, reject_code=None, reject_reason=None, timeout=60): """Send blocks to test node and test whether the tip advances. - add all blocks to our block_store @@ -508,16 +508,16 @@ class P2PDataStore(P2PInterface): wait_until(lambda: blocks[-1].sha256 in self.getdata_requests, timeout=timeout, lock=mininode_lock) if success: - wait_until(lambda: rpc.getbestblockhash() == blocks[-1].hash, timeout=timeout) + wait_until(lambda: node.getbestblockhash() == blocks[-1].hash, timeout=timeout) else: - assert rpc.getbestblockhash() != blocks[-1].hash + assert node.getbestblockhash() != blocks[-1].hash if reject_code is not None: wait_until(lambda: self.reject_code_received == reject_code, lock=mininode_lock) if reject_reason is not None: wait_until(lambda: self.reject_reason_received == reject_reason, lock=mininode_lock) - def send_txs_and_test(self, txs, rpc, success=True, expect_disconnect=False, reject_code=None, reject_reason=None): + def send_txs_and_test(self, txs, node, *, success=True, expect_disconnect=False, reject_code=None, reject_reason=None): """Send txs to test node and test whether they're accepted to the mempool. - add all txs to our tx_store @@ -541,7 +541,7 @@ class P2PDataStore(P2PInterface): else: self.sync_with_ping() - raw_mempool = rpc.getrawmempool() + raw_mempool = node.getrawmempool() if success: # Check that all txs are now in the mempool for tx in txs: |