From fa782a308dbe7bc579c122f63c1c65666fc85e91 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 29 Aug 2018 12:42:46 -0400 Subject: qa: Use named args in some tests --- test/functional/p2p_segwit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/functional/p2p_segwit.py') diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py index 82eacc84f4..45dc2928d3 100755 --- a/test/functional/p2p_segwit.py +++ b/test/functional/p2p_segwit.py @@ -119,7 +119,7 @@ def get_virtual_size(witness_block): vsize = int((3 * base_size + total_size + 3) / 4) return vsize -def test_transaction_acceptance(rpc, p2p, tx, with_witness, accepted, reason=None): +def test_transaction_acceptance(node, p2p, tx, with_witness, accepted, reason=None): """Send a transaction to the node and check that it's accepted to the mempool - Submit the transaction over the p2p interface @@ -129,13 +129,13 @@ def test_transaction_acceptance(rpc, p2p, tx, with_witness, accepted, reason=Non tx_message = msg_witness_tx(tx) p2p.send_message(tx_message) p2p.sync_with_ping() - assert_equal(tx.hash in rpc.getrawmempool(), accepted) + assert_equal(tx.hash in node.getrawmempool(), accepted) if (reason is not None and not accepted): # Check the rejection reason as well. with mininode_lock: assert_equal(p2p.last_message["reject"].reason, reason) -def test_witness_block(rpc, p2p, block, accepted, with_witness=True, reason=None): +def test_witness_block(node, p2p, block, accepted, with_witness=True, reason=None): """Send a block to the node and check that it's accepted - Submit the block over the p2p interface @@ -145,7 +145,7 @@ def test_witness_block(rpc, p2p, block, accepted, with_witness=True, reason=None else: p2p.send_message(msg_block(block)) p2p.sync_with_ping() - assert_equal(rpc.getbestblockhash() == block.hash, accepted) + assert_equal(node.getbestblockhash() == block.hash, accepted) if (reason is not None and not accepted): # Check the rejection reason as well. with mininode_lock: -- cgit v1.2.3