Skip to content

Commit fafe5f0

Browse files
author
MarcoFalke
committed
test: Remove unused imports
1 parent fa16a09 commit fafe5f0

28 files changed

+79
-41
lines changed

test/functional/feature_bip68_sequence.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010
from test_framework.messages import COIN, COutPoint, CTransaction, CTxIn, CTxOut, FromHex, ToHex
1111
from test_framework.script import CScript
1212
from test_framework.test_framework import BitcoinTestFramework
13-
from test_framework.util import assert_equal, assert_greater_than, assert_raises_rpc_error, get_bip9_status, satoshi_round, sync_blocks
13+
from test_framework.util import (
14+
assert_equal,
15+
assert_greater_than,
16+
assert_raises_rpc_error,
17+
get_bip9_status,
18+
satoshi_round,
19+
)
1420

1521
SEQUENCE_LOCKTIME_DISABLE_FLAG = (1<<31)
1622
SEQUENCE_LOCKTIME_TYPE_FLAG = (1<<22) # this means use time (0 means height)

test/functional/feature_fee_estimation.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2014-2018 The Bitcoin Core developers
2+
# Copyright (c) 2014-2019 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test fee estimation code."""
@@ -15,8 +15,6 @@
1515
assert_greater_than_or_equal,
1616
connect_nodes,
1717
satoshi_round,
18-
sync_blocks,
19-
sync_mempools,
2018
)
2119

2220
# Construct 2 trivial P2SH's and the ScriptSigs that spend them

test/functional/feature_pruning.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@
1414
from test_framework.messages import CBlock, ToHex
1515
from test_framework.script import CScript, OP_RETURN, OP_NOP
1616
from test_framework.test_framework import BitcoinTestFramework
17-
from test_framework.util import assert_equal, assert_greater_than, assert_raises_rpc_error, connect_nodes, disconnect_nodes, sync_blocks, wait_until
17+
from test_framework.util import (
18+
assert_equal,
19+
assert_greater_than,
20+
assert_raises_rpc_error,
21+
connect_nodes,
22+
disconnect_nodes,
23+
wait_until,
24+
)
1825

1926
MIN_BLOCKS_TO_KEEP = 288
2027

test/functional/feature_segwit.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818
from test_framework.messages import COIN, COutPoint, CTransaction, CTxIn, CTxOut, FromHex, sha256, ToHex
1919
from test_framework.script import CScript, OP_HASH160, OP_CHECKSIG, OP_0, hash160, OP_EQUAL, OP_DUP, OP_EQUALVERIFY, OP_1, OP_2, OP_CHECKMULTISIG, OP_TRUE, OP_DROP
2020
from test_framework.test_framework import BitcoinTestFramework
21-
from test_framework.util import assert_equal, assert_raises_rpc_error, connect_nodes, hex_str_to_bytes, sync_blocks, try_rpc
21+
from test_framework.util import (
22+
assert_equal,
23+
assert_raises_rpc_error,
24+
connect_nodes,
25+
hex_str_to_bytes,
26+
try_rpc,
27+
)
2228

2329
NODE_0 = 0
2430
NODE_2 = 2

test/functional/mempool_packages.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
from test_framework.messages import COIN
1010
from test_framework.test_framework import BitcoinTestFramework
11-
from test_framework.util import assert_equal, assert_raises_rpc_error, satoshi_round, sync_blocks, sync_mempools
11+
from test_framework.util import (
12+
assert_equal,
13+
assert_raises_rpc_error,
14+
satoshi_round,
15+
)
1216

1317
MAX_ANCESTORS = 25
1418
MAX_DESCENDANTS = 25

test/functional/p2p_feefilter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from test_framework.messages import msg_feefilter
1111
from test_framework.mininode import mininode_lock, P2PInterface
1212
from test_framework.test_framework import BitcoinTestFramework
13-
from test_framework.util import sync_blocks, sync_mempools
13+
1414

1515
def hashToHex(hash):
1616
return format(hash, '064x')

test/functional/p2p_node_network_limited.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2017-2018 The Bitcoin Core developers
2+
# Copyright (c) 2017-2019 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Tests NODE_NETWORK_LIMITED.
@@ -11,7 +11,13 @@
1111
from test_framework.messages import CInv, msg_getdata, msg_verack, NODE_BLOOM, NODE_NETWORK_LIMITED, NODE_WITNESS
1212
from test_framework.mininode import P2PInterface, mininode_lock
1313
from test_framework.test_framework import BitcoinTestFramework
14-
from test_framework.util import assert_equal, disconnect_nodes, connect_nodes_bi, sync_blocks, wait_until
14+
from test_framework.util import (
15+
assert_equal,
16+
disconnect_nodes,
17+
connect_nodes_bi,
18+
wait_until,
19+
)
20+
1521

1622
class P2PIgnoreInv(P2PInterface):
1723
firstAddrnServices = 0

test/functional/p2p_segwit.py

-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@
7777
disconnect_nodes,
7878
get_bip9_status,
7979
hex_str_to_bytes,
80-
sync_blocks,
81-
sync_mempools,
8280
)
8381

8482
# The versionbit bit used to signal activation of SegWit

test/functional/p2p_sendheaders.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2014-2018 The Bitcoin Core developers
2+
# Copyright (c) 2014-2019 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test behavior of headers messages to announce blocks.
@@ -103,7 +103,6 @@
103103
from test_framework.test_framework import BitcoinTestFramework
104104
from test_framework.util import (
105105
assert_equal,
106-
sync_blocks,
107106
wait_until,
108107
)
109108

test/functional/p2p_unrequested_blocks.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@
5757
from test_framework.messages import CBlockHeader, CInv, msg_block, msg_headers, msg_inv
5858
from test_framework.mininode import mininode_lock, P2PInterface
5959
from test_framework.test_framework import BitcoinTestFramework
60-
from test_framework.util import assert_equal, assert_raises_rpc_error, connect_nodes, sync_blocks
60+
from test_framework.util import (
61+
assert_equal,
62+
assert_raises_rpc_error,
63+
connect_nodes,
64+
)
6165

6266

6367
class AcceptBlockTest(BitcoinTestFramework):

test/functional/rpc_getchaintips.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2014-2018 The Bitcoin Core developers
2+
# Copyright (c) 2014-2019 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test the getchaintips RPC.

test/functional/rpc_invalidateblock.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2014-2018 The Bitcoin Core developers
2+
# Copyright (c) 2014-2019 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test the invalidateblock RPC."""
@@ -9,7 +9,6 @@
99
from test_framework.util import (
1010
assert_equal,
1111
connect_nodes_bi,
12-
sync_blocks,
1312
wait_until,
1413
)
1514

test/functional/rpc_preciousblock.py

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from test_framework.util import (
99
assert_equal,
1010
connect_nodes_bi,
11-
sync_blocks,
1211
)
1312

1413
def unidirectional_node_sync_via_rpc(node_src, node_dest):

test/functional/rpc_psbt.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77

88
from decimal import Decimal
99
from test_framework.test_framework import BitcoinTestFramework
10-
from test_framework.util import assert_equal, assert_raises_rpc_error, connect_nodes_bi, disconnect_nodes, find_output, sync_blocks
10+
from test_framework.util import (
11+
assert_equal,
12+
assert_raises_rpc_error,
13+
connect_nodes_bi,
14+
disconnect_nodes,
15+
find_output,
16+
)
1117

1218
import json
1319
import os
@@ -192,8 +198,8 @@ def run_test(self):
192198
psbtx_info = self.nodes[0].walletcreatefundedpsbt([{"txid":unspent["txid"], "vout":unspent["vout"]}], [{self.nodes[2].getnewaddress():unspent["amount"]+1}], block_height+2, {"replaceable":True}, False)
193199
decoded_psbt = self.nodes[0].decodepsbt(psbtx_info["psbt"])
194200
for tx_in, psbt_in in zip(decoded_psbt["tx"]["vin"], decoded_psbt["inputs"]):
195-
assert_equal(tx_in["sequence"], MAX_BIP125_RBF_SEQUENCE)
196-
assert "bip32_derivs" not in psbt_in
201+
assert_equal(tx_in["sequence"], MAX_BIP125_RBF_SEQUENCE)
202+
assert "bip32_derivs" not in psbt_in
197203
assert_equal(decoded_psbt["tx"]["locktime"], block_height+2)
198204

199205
# Same construction with only locktime set

test/functional/wallet_abandonconflict.py

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
assert_raises_rpc_error,
1919
connect_nodes,
2020
disconnect_nodes,
21-
sync_blocks,
22-
sync_mempools,
2321
)
2422

2523

test/functional/wallet_address_types.py

-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@
6363
assert_greater_than,
6464
assert_raises_rpc_error,
6565
connect_nodes_bi,
66-
sync_blocks,
67-
sync_mempools,
6866
)
6967

7068

test/functional/wallet_backup.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2014-2018 The Bitcoin Core developers
2+
# Copyright (c) 2014-2019 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test the wallet backup features.
@@ -36,7 +36,12 @@
3636
import shutil
3737

3838
from test_framework.test_framework import BitcoinTestFramework
39-
from test_framework.util import assert_equal, assert_raises_rpc_error, connect_nodes, sync_blocks, sync_mempools
39+
from test_framework.util import (
40+
assert_equal,
41+
assert_raises_rpc_error,
42+
connect_nodes,
43+
)
44+
4045

4146
class WalletBackupTest(BitcoinTestFramework):
4247
def set_test_params(self):

test/functional/wallet_balance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2018 The Bitcoin Core developers
2+
# Copyright (c) 2018-2019 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test the wallet balance RPC methods."""

test/functional/wallet_basic.py

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
assert_fee_amount,
1414
assert_raises_rpc_error,
1515
connect_nodes_bi,
16-
sync_blocks,
1716
wait_until,
1817
)
1918

test/functional/wallet_bumpfee.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@
1919
from test_framework.blocktools import add_witness_commitment, create_block, create_coinbase, send_to_witness
2020
from test_framework.messages import BIP125_SEQUENCE_NUMBER, CTransaction
2121
from test_framework.test_framework import BitcoinTestFramework
22-
from test_framework.util import assert_equal, assert_greater_than, assert_raises_rpc_error, connect_nodes_bi, hex_str_to_bytes, sync_mempools
22+
from test_framework.util import (
23+
assert_equal,
24+
assert_greater_than,
25+
assert_raises_rpc_error,
26+
connect_nodes_bi,
27+
hex_str_to_bytes,
28+
)
2329

2430
WALLET_PASSPHRASE = "test"
2531
WALLET_PASSPHRASE_TIMEOUT = 3600

test/functional/wallet_import_rescan.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2014-2018 The Bitcoin Core developers
2+
# Copyright (c) 2014-2019 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test wallet import RPCs.
@@ -20,7 +20,12 @@
2020
"""
2121

2222
from test_framework.test_framework import BitcoinTestFramework
23-
from test_framework.util import (assert_raises_rpc_error, connect_nodes, sync_blocks, assert_equal, set_node_times)
23+
from test_framework.util import (
24+
assert_raises_rpc_error,
25+
connect_nodes,
26+
assert_equal,
27+
set_node_times,
28+
)
2429

2530
import collections
2631
import enum

test/functional/wallet_keypool_topup.py

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from test_framework.util import (
1818
assert_equal,
1919
connect_nodes_bi,
20-
sync_blocks,
2120
)
2221

2322

test/functional/wallet_listreceivedby.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2014-2018 The Bitcoin Core developers
2+
# Copyright (c) 2014-2019 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test the listreceivedbyaddress RPC."""
@@ -10,7 +10,6 @@
1010
assert_array_result,
1111
assert_equal,
1212
assert_raises_rpc_error,
13-
sync_blocks,
1413
)
1514

1615

test/functional/wallet_listsinceblock.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2017-2018 The Bitcoin Core developers
2+
# Copyright (c) 2017-2019 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test the listsincelast RPC."""

test/functional/wallet_listtransactions.py

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
assert_array_result,
1313
assert_equal,
1414
hex_str_to_bytes,
15-
sync_mempools,
1615
)
1716

1817
def tx_from_hex(hexstring):

test/functional/wallet_resendwallettransactions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2017-2018 The Bitcoin Core developers
2+
# Copyright (c) 2017-2019 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test that the wallet resends transactions periodically."""

test/functional/wallet_txn_clone.py

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
assert_equal,
1111
connect_nodes,
1212
disconnect_nodes,
13-
sync_blocks,
1413
)
1514
from test_framework.messages import CTransaction, COIN
1615

test/functional/wallet_txn_doublespend.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
connect_nodes,
1212
disconnect_nodes,
1313
find_output,
14-
sync_blocks,
1514
)
1615

1716
class TxnMallTest(BitcoinTestFramework):

0 commit comments

Comments
 (0)