Skip to content

Commit 2dcb5c2

Browse files
committed
test: wallet_zapwallettxes.py whitelist peers to speed up tx relay.
1 parent 2f8a034 commit 2dcb5c2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/functional/wallet_zapwallettxes.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class ZapWalletTXesTest (PivxTestFramework):
2525
def set_test_params(self):
2626
self.setup_clean_chain = True
2727
self.num_nodes = 2
28+
# whitelist all peers to speed up tx relay / mempool sync
29+
self.extra_args = [["-whitelist=127.0.0.1"]] * self.num_nodes
2830

2931
def run_test(self):
3032
self.log.info("Mining blocks...")
@@ -54,9 +56,9 @@ def run_test(self):
5456
assert_equal(self.nodes[1].getwalletinfo()["unconfirmed_balance"], 20)
5557
assert_equal(self.nodes[1].getunconfirmedbalance(), 20)
5658

57-
# Stop-start node0. Both confirmed and unconfirmed transactions remain in the wallet.
58-
self.stop_node(0)
59-
self.start_node(0)
59+
# Restart node0. Both confirmed and unconfirmed transactions remain in the wallet.
60+
self.restart_node(0)
61+
6062
assert_equal(self.nodes[0].gettransaction(txid1)['txid'], txid1)
6163
assert_equal(self.nodes[0].gettransaction(txid2)['txid'], txid2)
6264

0 commit comments

Comments
 (0)