mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-23 11:32:50 +02:00
test: speedup wallet_listtransactions by whitelisting peers (immediate tx relay)
By whitelisting the peers via -whitelist, the inventory is transmissioned immediately rather than on average every 5 seconds, speeding up the test by at least a factor of two: before: $ time ./wallet_listtransactions.py ... 0m40.25s real 0m01.74s user 0m01.70s system with this PR: $ time ./wallet_listtransactions.py ... 0m14.93s real 0m01.68s user 0m01.87s system This commit also moves the wallet_listtransactions tests into the < 30s group.
This commit is contained in:
@@ -18,6 +18,9 @@ from test_framework.util import (
|
||||
class ListTransactionsTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
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=noban@127.0.0.1"]] * self.num_nodes
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
Reference in New Issue
Block a user