Skip to content

Commit

Permalink
test: speedup p2p_feefilter.py by whitelisting peers (immediate tx re…
Browse files Browse the repository at this point in the history
…lay)

Most of the test time is spent in wait_for_invs() after sending to addresses,
i.e. the bottleneck is in relaying transactions. By whitelisting the peers via
-whitelist, the inventory is transmissioned immediately rather than on average
every 5 seconds, speeding up the test significantly:

before:
$ time ./p2p_feefilter.py
...
real    0m39.367s
user    0m1.227s
sys 0m0.571s

with this commit:
$ time ./p2p_feefilter.py
...
real    0m9.386s
user    0m1.120s
sys 0m0.577s
  • Loading branch information
theStack committed Aug 12, 2020
1 parent fe3f0cc commit 9e78943
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/functional/p2p_feefilter.py
Expand Up @@ -54,7 +54,12 @@ def set_test_params(self):
# mempool and wallet feerate calculation based on GetFee
# rounding down 3 places, leading to stranded transactions.
# See issue #16499
self.extra_args = [["-minrelaytxfee=0.00000100", "-mintxfee=0.00000100"]] * self.num_nodes
# grant noban permission to all peers to speed up tx relay / mempool sync
self.extra_args = [[
"-minrelaytxfee=0.00000100",
"-mintxfee=0.00000100",
"-whitelist=noban@127.0.0.1",
]] * self.num_nodes

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

0 comments on commit 9e78943

Please sign in to comment.