Skip to content

Commit 0e7c90e

Browse files
committed
test: speed up wallet_avoidreuse.py
Use -whitelist to speed up transaction relay. The wallet_avoidreuse.py test is not intended to test transaction relay/timing, so it should be fine to do this here. This greatly reduces test run time variability and speeds up the test by 2-3 times on average, e.g. on my system from 20-30 seconds down to 8-10 seconds.
1 parent 6d50b26 commit 0e7c90e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/functional/wallet_avoidreuse.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ class AvoidReuseTest(BitcoinTestFramework):
6868
def set_test_params(self):
6969
self.setup_clean_chain = False
7070
self.num_nodes = 2
71+
# This test isn't testing txn relay/timing, so set whitelist on the
72+
# peers for instant txn relay. This speeds up the test run time 2-3x.
73+
self.extra_args = [["-whitelist=127.0.0.1"]] * self.num_nodes
7174

7275
def skip_test_if_missing_module(self):
7376
self.skip_if_no_wallet()

0 commit comments

Comments
 (0)