Skip to content

Commit fba4baa

Browse files
committed
test: speed up wallet_address_types by whitelisting peers (immediate tx relay)
approaches another part of #16613 ("Functional test suite bottlenecks") As for wallet_backup.py (Commit 581c9be), the bottleneck is in relaying transactions. By whitelisting the peers, the inventory is transmissioned immediately rather than on average every 5 seconds, speeding up the test significantly: before: $ time ./wallet_address_types.py real 1m30.072s user 0m6.478s sys 0m2.298s with this PR: $ time ./wallet_address_types.py real 0m26.785s user 0m5.525s sys 0m1.888s
1 parent e82f874 commit fba4baa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/functional/wallet_address_types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ def set_test_params(self):
8080
["-changetype=p2sh-segwit"],
8181
[],
8282
]
83+
# whitelist all peers to speed up tx relay / mempool sync
84+
for args in self.extra_args:
85+
args.append("-whitelist=127.0.0.1")
8386

8487
def skip_test_if_missing_module(self):
8588
self.skip_if_no_wallet()

0 commit comments

Comments
 (0)