From b4353db5d65b7f35378f318478926301d5a37d34 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Mon, 12 Mar 2018 14:15:25 +0000 Subject: [PATCH] pyflakes cleanups to RPC tests after Overwinter PRs. Signed-off-by: Daira Hopwood --- qa/rpc-tests/mempool_tx_expiry.py | 11 ++++------- qa/rpc-tests/overwinter_peer_management.py | 3 +-- qa/rpc-tests/reorg_limit.py | 2 -- qa/rpc-tests/wallet_mergetoaddress.py | 1 - qa/rpc-tests/wallet_overwintertx.py | 4 +--- 5 files changed, 6 insertions(+), 15 deletions(-) diff --git a/qa/rpc-tests/mempool_tx_expiry.py b/qa/rpc-tests/mempool_tx_expiry.py index b78af986c..d0f8073a4 100755 --- a/qa/rpc-tests/mempool_tx_expiry.py +++ b/qa/rpc-tests/mempool_tx_expiry.py @@ -8,13 +8,11 @@ # from test_framework.test_framework import BitcoinTestFramework -from test_framework.authproxy import JSONRPCException -from test_framework.util import assert_equal, connect_nodes, \ - connect_nodes_bi, sync_blocks, start_nodes, sync_blocks, sync_mempools, \ +from test_framework.util import assert_equal, \ + connect_nodes_bi, sync_blocks, start_nodes, \ wait_and_assert_operationid_status from decimal import Decimal -import time class MempoolTxExpiryTest(BitcoinTestFramework): @@ -25,17 +23,16 @@ class MempoolTxExpiryTest(BitcoinTestFramework): # TODO: Test case of dependent txs in reorgs # chain is at block height 199 when run_test executes def run_test(self): - alice = self.nodes[0].getnewaddress() z_alice = self.nodes[0].z_getnewaddress() bob = self.nodes[2].getnewaddress() z_bob = self.nodes[2].z_getnewaddress() - + # When Overwinter not yet activated, no expiryheight in tx sapling_tx = self.nodes[0].sendtoaddress(bob, 0.01) rawtx = self.nodes[0].getrawtransaction(sapling_tx, 1) assert_equal(rawtx["overwintered"], False) assert("expiryheight" not in rawtx) - + self.nodes[0].generate(6) self.sync_all() diff --git a/qa/rpc-tests/overwinter_peer_management.py b/qa/rpc-tests/overwinter_peer_management.py index a7a71e52d..6c59e47ba 100755 --- a/qa/rpc-tests/overwinter_peer_management.py +++ b/qa/rpc-tests/overwinter_peer_management.py @@ -4,8 +4,7 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import NodeConn, NodeConnCB, NetworkThread, \ - EarlyDisconnectError, msg_inv, mininode_lock, msg_ping, \ - MY_VERSION, OVERWINTER_PROTO_VERSION + msg_ping, MY_VERSION, OVERWINTER_PROTO_VERSION from test_framework.test_framework import BitcoinTestFramework from test_framework.util import initialize_chain_clean, start_nodes, \ p2p_port, assert_equal diff --git a/qa/rpc-tests/reorg_limit.py b/qa/rpc-tests/reorg_limit.py index 3857498ee..12cd146fc 100755 --- a/qa/rpc-tests/reorg_limit.py +++ b/qa/rpc-tests/reorg_limit.py @@ -11,8 +11,6 @@ from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( check_node, connect_nodes_bi, - initialize_chain_clean, - start_node, sync_blocks, ) from time import sleep diff --git a/qa/rpc-tests/wallet_mergetoaddress.py b/qa/rpc-tests/wallet_mergetoaddress.py index e923b5788..ff3534e9b 100755 --- a/qa/rpc-tests/wallet_mergetoaddress.py +++ b/qa/rpc-tests/wallet_mergetoaddress.py @@ -9,7 +9,6 @@ from test_framework.util import assert_equal, initialize_chain_clean, \ start_node, connect_nodes_bi, sync_blocks, sync_mempools, \ wait_and_assert_operationid_status -import time from decimal import Decimal class WalletMergeToAddressTest (BitcoinTestFramework): diff --git a/qa/rpc-tests/wallet_overwintertx.py b/qa/rpc-tests/wallet_overwintertx.py index 176e8693e..61932fece 100755 --- a/qa/rpc-tests/wallet_overwintertx.py +++ b/qa/rpc-tests/wallet_overwintertx.py @@ -4,10 +4,8 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework -from test_framework.authproxy import JSONRPCException from test_framework.util import assert_equal, initialize_chain_clean, \ - start_nodes, connect_nodes_bi, sync_blocks, sync_mempools, \ - wait_and_assert_operationid_status + start_nodes, connect_nodes_bi, wait_and_assert_operationid_status from decimal import Decimal