Browse Source

pyflakes cleanups to RPC tests after Overwinter PRs.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
metaverse
Daira Hopwood 6 years ago
parent
commit
b4353db5d6
  1. 11
      qa/rpc-tests/mempool_tx_expiry.py
  2. 3
      qa/rpc-tests/overwinter_peer_management.py
  3. 2
      qa/rpc-tests/reorg_limit.py
  4. 1
      qa/rpc-tests/wallet_mergetoaddress.py
  5. 4
      qa/rpc-tests/wallet_overwintertx.py

11
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()

3
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

2
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

1
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):

4
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

Loading…
Cancel
Save