Skip to content

Commit

Permalink
test: speed up wallet_avoidreuse.py
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jonatack committed Nov 4, 2019
1 parent e439470 commit d2edf02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/functional/wallet_avoidreuse.py
Expand Up @@ -67,6 +67,9 @@ class AvoidReuseTest(BitcoinTestFramework):
def set_test_params(self):
self.setup_clean_chain = False
self.num_nodes = 2
# This test isn't testing txn relay/timing, so set whitelist on the
# peers for instant txn relay. This speeds up the test run time 2-3x.
self.extra_args = [["-whitelist=127.0.0.1"]] * 2

def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
Expand Down

0 comments on commit d2edf02

Please sign in to comment.