Skip to content

Commit fb6c6a7

Browse files
committed
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.
1 parent a88fa1a commit fb6c6a7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

test/functional/test_runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@
109109
'p2p_tx_download.py',
110110
'mempool_updatefromblock.py',
111111
'wallet_dump.py --legacy-wallet',
112-
'wallet_listtransactions.py --legacy-wallet',
113-
'wallet_listtransactions.py --descriptors',
114112
'feature_taproot.py --previous_release',
115113
'feature_taproot.py',
116114
'rpc_signer.py',
@@ -159,6 +157,8 @@
159157
'wallet_createwallet.py --legacy-wallet',
160158
'wallet_createwallet.py --usecli',
161159
'wallet_createwallet.py --descriptors',
160+
'wallet_listtransactions.py --legacy-wallet',
161+
'wallet_listtransactions.py --descriptors',
162162
'wallet_watchonly.py --legacy-wallet',
163163
'wallet_watchonly.py --usecli --legacy-wallet',
164164
'wallet_reorgsrestore.py',

test/functional/wallet_listtransactions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
class ListTransactionsTest(BitcoinTestFramework):
1919
def set_test_params(self):
2020
self.num_nodes = 2
21+
# This test isn't testing txn relay/timing, so set whitelist on the
22+
# peers for instant txn relay. This speeds up the test run time 2-3x.
23+
self.extra_args = [["[email protected]"]] * self.num_nodes
2124

2225
def skip_test_if_missing_module(self):
2326
self.skip_if_no_wallet()

0 commit comments

Comments
 (0)