From 9e7894357e296dbe0be775e1527654729dbb71b0 Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Wed, 22 Jul 2020 02:44:58 +0200 Subject: [PATCH] test: speedup p2p_feefilter.py by whitelisting peers (immediate tx relay) 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 --- test/functional/p2p_feefilter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/functional/p2p_feefilter.py b/test/functional/p2p_feefilter.py index c811ed7b72..3a9b8dfbd7 100755 --- a/test/functional/p2p_feefilter.py +++ b/test/functional/p2p_feefilter.py @@ -54,7 +54,12 @@ class FeeFilterTest(BitcoinTestFramework): # 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()