Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14864566
D17115.id50789.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
40 KB
Subscribers
None
D17115.id50789.diff
View Options
diff --git a/test/functional/abc-invalid-chains.py b/test/functional/abc-invalid-chains.py
--- a/test/functional/abc-invalid-chains.py
+++ b/test/functional/abc-invalid-chains.py
@@ -14,15 +14,12 @@
def set_test_params(self):
self.num_nodes = 1
self.setup_clean_chain = True
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.tip = None
self.blocks = {}
self.block_heights = {}
- self.extra_args = [
- [
- "-whitelist=noban@127.0.0.1",
- "-automaticunparking=1",
- ]
- ]
+ self.extra_args = [["-automaticunparking=1"]]
def next_block(self, number):
if self.tip is None:
diff --git a/test/functional/abc-magnetic-anomaly-mining.py b/test/functional/abc-magnetic-anomaly-mining.py
--- a/test/functional/abc-magnetic-anomaly-mining.py
+++ b/test/functional/abc-magnetic-anomaly-mining.py
@@ -19,12 +19,14 @@
# it errors out if it is not connected to other nodes
self.num_nodes = 2
self.setup_clean_chain = True
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.block_heights = {}
self.tip = None
self.blocks = {}
self.mocktime = int(time.time()) - 600 * 100
- extra_arg = ["-spendzeroconfchange=0", "-whitelist=noban@127.0.0.1"]
+ extra_arg = ["-spendzeroconfchange=0"]
self.extra_args = [extra_arg, extra_arg]
def skip_test_if_missing_module(self):
diff --git a/test/functional/abc-mempool-coherence-on-activations.py b/test/functional/abc-mempool-coherence-on-activations.py
--- a/test/functional/abc-mempool-coherence-on-activations.py
+++ b/test/functional/abc-mempool-coherence-on-activations.py
@@ -116,12 +116,13 @@
def set_test_params(self):
self.num_nodes = 1
self.setup_clean_chain = True
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.block_heights = {}
self.tip = None
self.blocks = {}
self.extra_args = [
[
- "-whitelist=noban@127.0.0.1",
EXTRA_ARG,
"-acceptnonstdtxn=1",
"-automaticunparking=1",
diff --git a/test/functional/abc-replay-protection.py b/test/functional/abc-replay-protection.py
--- a/test/functional/abc-replay-protection.py
+++ b/test/functional/abc-replay-protection.py
@@ -48,12 +48,13 @@
def set_test_params(self):
self.num_nodes = 1
self.setup_clean_chain = True
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.block_heights = {}
self.tip = None
self.blocks = {}
self.extra_args = [
[
- "-whitelist=noban@127.0.0.1",
f"-replayprotectionactivationtime={REPLAY_PROTECTION_START_TIME}",
"-acceptnonstdtxn=1",
]
diff --git a/test/functional/abc-transaction-ordering.py b/test/functional/abc-transaction-ordering.py
--- a/test/functional/abc-transaction-ordering.py
+++ b/test/functional/abc-transaction-ordering.py
@@ -35,7 +35,8 @@
self.block_heights = {}
self.tip = None
self.blocks = {}
- self.extra_args = [["-whitelist=noban@127.0.0.1"]]
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
def add_transactions_to_block(self, block, tx_list):
[tx.rehash() for tx in tx_list]
diff --git a/test/functional/abc_feature_persist_avapeers.py b/test/functional/abc_feature_persist_avapeers.py
--- a/test/functional/abc_feature_persist_avapeers.py
+++ b/test/functional/abc_feature_persist_avapeers.py
@@ -29,10 +29,11 @@
"-avacooldown=0",
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
- "-whitelist=noban@127.0.0.1",
"-avalanchestakingrewards=1",
]
]
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
def run_test(self):
node = self.nodes[0]
diff --git a/test/functional/abc_feature_proof_cleanup.py b/test/functional/abc_feature_proof_cleanup.py
--- a/test/functional/abc_feature_proof_cleanup.py
+++ b/test/functional/abc_feature_proof_cleanup.py
@@ -28,12 +28,12 @@
class ProofsCleanupTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avaproofstakeutxodustthreshold=1000000",
"-avaproofstakeutxoconfirmations=1",
- # Get rid of the getdata delay penalty for inbounds
- "-whitelist=noban@127.0.0.1",
]
] * self.num_nodes
diff --git a/test/functional/abc_feature_rtt_activation.py b/test/functional/abc_feature_rtt_activation.py
--- a/test/functional/abc_feature_rtt_activation.py
+++ b/test/functional/abc_feature_rtt_activation.py
@@ -17,6 +17,8 @@
class AbcRTTActivationTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-enablertt",
@@ -25,7 +27,6 @@
"-avacooldown=0",
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
- "-whitelist=noban@127.0.0.1",
f"-augustoactivationtime={AUGUSTO_ACTIVATION}",
],
]
diff --git a/test/functional/abc_mining_rtt.py b/test/functional/abc_mining_rtt.py
--- a/test/functional/abc_mining_rtt.py
+++ b/test/functional/abc_mining_rtt.py
@@ -43,6 +43,8 @@
class AbcMiningHeartbeatTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-enablertt",
@@ -51,7 +53,6 @@
"-avacooldown=0",
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
- "-whitelist=noban@127.0.0.1",
f"-augustoactivationtime={THE_FUTURE}",
],
]
diff --git a/test/functional/abc_mining_stakingrewards.py b/test/functional/abc_mining_stakingrewards.py
--- a/test/functional/abc_mining_stakingrewards.py
+++ b/test/functional/abc_mining_stakingrewards.py
@@ -46,6 +46,8 @@
class AbcMiningStakingRewardsTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avaproofstakeutxodustthreshold=1000000",
@@ -53,7 +55,6 @@
"-avacooldown=0",
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
- "-whitelist=noban@127.0.0.1",
"-avalanchestakingrewards=1",
],
]
diff --git a/test/functional/abc_p2p_avalanche_cooldown.py b/test/functional/abc_p2p_avalanche_cooldown.py
--- a/test/functional/abc_p2p_avalanche_cooldown.py
+++ b/test/functional/abc_p2p_avalanche_cooldown.py
@@ -26,6 +26,8 @@
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-enableminerfund",
@@ -33,7 +35,6 @@
"-avaproofstakeutxoconfirmations=1",
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
- "-whitelist=noban@127.0.0.1",
"-avacooldown=10000",
"-persistavapeers=0",
# For polling transactions
diff --git a/test/functional/abc_p2p_avalanche_policy_minerfund.py b/test/functional/abc_p2p_avalanche_policy_minerfund.py
--- a/test/functional/abc_p2p_avalanche_policy_minerfund.py
+++ b/test/functional/abc_p2p_avalanche_policy_minerfund.py
@@ -31,6 +31,8 @@
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-enableminerfund",
@@ -39,7 +41,6 @@
"-avacooldown=0",
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
- "-whitelist=noban@127.0.0.1",
],
]
diff --git a/test/functional/abc_p2p_avalanche_policy_rtt.py b/test/functional/abc_p2p_avalanche_policy_rtt.py
--- a/test/functional/abc_p2p_avalanche_policy_rtt.py
+++ b/test/functional/abc_p2p_avalanche_policy_rtt.py
@@ -17,6 +17,8 @@
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 2
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-enablertt",
@@ -25,7 +27,6 @@
"-avacooldown=0",
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
- "-whitelist=noban@127.0.0.1",
f"-augustoactivationtime={THE_FUTURE}",
],
[],
diff --git a/test/functional/abc_p2p_avalanche_policy_stakingrewards.py b/test/functional/abc_p2p_avalanche_policy_stakingrewards.py
--- a/test/functional/abc_p2p_avalanche_policy_stakingrewards.py
+++ b/test/functional/abc_p2p_avalanche_policy_stakingrewards.py
@@ -28,6 +28,8 @@
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avaproofstakeutxodustthreshold=1000000",
@@ -35,7 +37,6 @@
"-avacooldown=0",
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
- "-whitelist=noban@127.0.0.1",
"-avalanchestakingrewards=1",
],
]
diff --git a/test/functional/abc_p2p_avalanche_remote_proofs.py b/test/functional/abc_p2p_avalanche_remote_proofs.py
--- a/test/functional/abc_p2p_avalanche_remote_proofs.py
+++ b/test/functional/abc_p2p_avalanche_remote_proofs.py
@@ -32,6 +32,8 @@
class AvalancheRemoteProofsTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avaproofstakeutxodustthreshold=10000",
@@ -39,7 +41,6 @@
"-avaminquorumstake=1000000",
"-avaminavaproofsnodecount=0",
"-avacooldown=0",
- "-whitelist=noban@127.0.0.1",
"-persistavapeers=0",
]
] * self.num_nodes
diff --git a/test/functional/abc_p2p_avalanche_transaction_voting.py b/test/functional/abc_p2p_avalanche_transaction_voting.py
--- a/test/functional/abc_p2p_avalanche_transaction_voting.py
+++ b/test/functional/abc_p2p_avalanche_transaction_voting.py
@@ -31,6 +31,8 @@
class AvalancheTransactionVotingTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avalanchepreconsensus=1",
@@ -40,7 +42,6 @@
"-avaproofstakeutxodustthreshold=1000000",
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
- "-whitelist=noban@127.0.0.1",
]
]
diff --git a/test/functional/abc_p2p_avalanche_voting.py b/test/functional/abc_p2p_avalanche_voting.py
--- a/test/functional/abc_p2p_avalanche_voting.py
+++ b/test/functional/abc_p2p_avalanche_voting.py
@@ -27,6 +27,8 @@
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 2
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avaproofstakeutxodustthreshold=1000000",
@@ -34,7 +36,6 @@
"-avacooldown=0",
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
- "-whitelist=noban@127.0.0.1",
"-persistavapeers=0",
],
[
@@ -44,7 +45,6 @@
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
"-noparkdeepreorg",
- "-whitelist=noban@127.0.0.1",
],
]
self.supports_cli = False
diff --git a/test/functional/abc_p2p_compactblocks.py b/test/functional/abc_p2p_compactblocks.py
--- a/test/functional/abc_p2p_compactblocks.py
+++ b/test/functional/abc_p2p_compactblocks.py
@@ -82,9 +82,10 @@
self.tip = None
self.blocks = {}
self.excessive_block_size = 16 * ONE_MEGABYTE
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
- "-whitelist=noban@127.0.0.1",
"-maxmempool=99999",
f"-excessiveblocksize={self.excessive_block_size}",
"-acceptnonstdtxn=1",
diff --git a/test/functional/abc_p2p_compactproofs.py b/test/functional/abc_p2p_compactproofs.py
--- a/test/functional/abc_p2p_compactproofs.py
+++ b/test/functional/abc_p2p_compactproofs.py
@@ -51,12 +51,13 @@
class CompactProofsTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avaproofstakeutxodustthreshold=1000000",
"-avaproofstakeutxoconfirmations=1",
"-avacooldown=0",
- "-whitelist=noban@127.0.0.1",
"-persistavapeers=0",
]
] * self.num_nodes
diff --git a/test/functional/abc_p2p_fullblocktest.py b/test/functional/abc_p2p_fullblocktest.py
--- a/test/functional/abc_p2p_fullblocktest.py
+++ b/test/functional/abc_p2p_fullblocktest.py
@@ -49,12 +49,9 @@
self.tip = None
self.blocks = {}
self.excessive_block_size = 100 * ONE_MEGABYTE
- self.extra_args = [
- [
- "-whitelist=noban@127.0.0.1",
- f"-excessiveblocksize={self.excessive_block_size}",
- ]
- ]
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
+ self.extra_args = [[f"-excessiveblocksize={self.excessive_block_size}"]]
self.supports_cli = False
# The default timeout is not enough when submitting large blocks with
# TSAN enabled
diff --git a/test/functional/abc_p2p_getavaaddr.py b/test/functional/abc_p2p_getavaaddr.py
--- a/test/functional/abc_p2p_getavaaddr.py
+++ b/test/functional/abc_p2p_getavaaddr.py
@@ -103,6 +103,8 @@
def set_test_params(self):
self.setup_clean_chain = False
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avaproofstakeutxodustthreshold=1000000",
@@ -110,7 +112,6 @@
"-avacooldown=0",
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
- "-whitelist=noban@127.0.0.1",
"-persistavapeers=0",
]
]
diff --git a/test/functional/abc_p2p_proof_inventory.py b/test/functional/abc_p2p_proof_inventory.py
--- a/test/functional/abc_p2p_proof_inventory.py
+++ b/test/functional/abc_p2p_proof_inventory.py
@@ -55,12 +55,13 @@
class ProofInventoryTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 5
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avaproofstakeutxodustthreshold=1000000",
"-avaproofstakeutxoconfirmations=2",
"-avacooldown=0",
- "-whitelist=noban@127.0.0.1",
"-persistavapeers=0",
]
] * self.num_nodes
diff --git a/test/functional/abc_rpc_avalancheproof.py b/test/functional/abc_rpc_avalancheproof.py
--- a/test/functional/abc_rpc_avalancheproof.py
+++ b/test/functional/abc_rpc_avalancheproof.py
@@ -57,13 +57,14 @@
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 2
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
f"-avaproofstakeutxodustthreshold={PROOF_DUST_THRESHOLD}",
"-avaproofstakeutxoconfirmations=1",
"-avalancheconflictingproofcooldown=0",
"-avacooldown=0",
- "-whitelist=noban@127.0.0.1",
]
] * self.num_nodes
self.supports_cli = False
diff --git a/test/functional/abc_rpc_invalidateavalancheproof.py b/test/functional/abc_rpc_invalidateavalancheproof.py
--- a/test/functional/abc_rpc_invalidateavalancheproof.py
+++ b/test/functional/abc_rpc_invalidateavalancheproof.py
@@ -25,6 +25,8 @@
class InvalidateAvalancheProofTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avalancheconflictingproofcooldown=0",
@@ -33,7 +35,6 @@
"-avaminquorumstake=250000000",
"-avaproofstakeutxodustthreshold=1000000",
"-avaminavaproofsnodecount=0",
- "-whitelist=noban@127.0.0.1",
]
]
diff --git a/test/functional/chronik_avalanche.py b/test/functional/chronik_avalanche.py
--- a/test/functional/chronik_avalanche.py
+++ b/test/functional/chronik_avalanche.py
@@ -22,6 +22,8 @@
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avaproofstakeutxodustthreshold=1000000",
@@ -30,7 +32,6 @@
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
"-chronik",
- "-whitelist=noban@127.0.0.1",
"-persistavapeers=0",
],
]
diff --git a/test/functional/chronik_ws.py b/test/functional/chronik_ws.py
--- a/test/functional/chronik_ws.py
+++ b/test/functional/chronik_ws.py
@@ -17,6 +17,8 @@
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avaproofstakeutxodustthreshold=1000000",
@@ -25,7 +27,6 @@
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
"-chronik",
- "-whitelist=noban@127.0.0.1",
"-enableminerfund",
],
]
diff --git a/test/functional/chronik_ws_script.py b/test/functional/chronik_ws_script.py
--- a/test/functional/chronik_ws_script.py
+++ b/test/functional/chronik_ws_script.py
@@ -30,6 +30,8 @@
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-avaproofstakeutxodustthreshold=1000000",
@@ -38,7 +40,6 @@
"-avaminquorumstake=0",
"-avaminavaproofsnodecount=0",
"-chronik",
- "-whitelist=noban@127.0.0.1",
],
]
self.supports_cli = False
diff --git a/test/functional/feature_cltv.py b/test/functional/feature_cltv.py
--- a/test/functional/feature_cltv.py
+++ b/test/functional/feature_cltv.py
@@ -68,9 +68,10 @@
class BIP65Test(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
- "-whitelist=noban@127.0.0.1",
"-par=1", # Use only one script thread to get the exact reject reason for testing
"-acceptnonstdtxn=1", # cltv_invalidate is nonstandard
]
diff --git a/test/functional/feature_csv_activation.py b/test/functional/feature_csv_activation.py
--- a/test/functional/feature_csv_activation.py
+++ b/test/functional/feature_csv_activation.py
@@ -91,7 +91,8 @@
def set_test_params(self):
self.num_nodes = 1
self.setup_clean_chain = True
- self.extra_args = [["-whitelist=noban@127.0.0.1"]]
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
def create_self_transfer_from_utxo(self, input_tx):
utxo = self.miniwallet.get_utxo(txid=input_tx.rehash(), mark_as_spent=False)
diff --git a/test/functional/feature_dersig.py b/test/functional/feature_dersig.py
--- a/test/functional/feature_dersig.py
+++ b/test/functional/feature_dersig.py
@@ -38,7 +38,8 @@
class BIP66Test(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
- self.extra_args = [["-whitelist=noban@127.0.0.1"]]
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.setup_clean_chain = True
self.rpc_timeout = 240
diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py
--- a/test/functional/interface_rest.py
+++ b/test/functional/interface_rest.py
@@ -44,6 +44,8 @@
self.setup_clean_chain = True
self.num_nodes = 2
self.extra_args = [["-rest"], []]
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.supports_cli = False
def skip_test_if_missing_module(self):
diff --git a/test/functional/interface_zmq.py b/test/functional/interface_zmq.py
--- a/test/functional/interface_zmq.py
+++ b/test/functional/interface_zmq.py
@@ -97,7 +97,8 @@
class ZMQTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
- self.extra_args = [["-whitelist=noban@127.0.0.1"]] * self.num_nodes
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
def skip_test_if_missing_module(self):
self.skip_if_no_py3_zmq()
@@ -126,8 +127,7 @@
self.restart_node(
0,
- self.extra_args[0]
- + [f"-zmqpub{topic}={address}" for topic, address in services],
+ [f"-zmqpub{topic}={address}" for topic, address in services],
)
for i, sub in enumerate(subscribers):
diff --git a/test/functional/mempool_limit.py b/test/functional/mempool_limit.py
--- a/test/functional/mempool_limit.py
+++ b/test/functional/mempool_limit.py
@@ -22,12 +22,13 @@
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-acceptnonstdtxn=1",
"-maxmempool=5",
"-spendzeroconfchange=0",
- "-whitelist=noban@127.0.0.1",
]
]
self.supports_cli = False
diff --git a/test/functional/mempool_packages.py b/test/functional/mempool_packages.py
--- a/test/functional/mempool_packages.py
+++ b/test/functional/mempool_packages.py
@@ -14,9 +14,9 @@
class MempoolPackagesTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
- self.extra_args = [
- ["-maxorphantx=1000", "-whitelist=noban@127.0.0.1"]
- ] * self.num_nodes
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
+ self.extra_args = [["-maxorphantx=1000"]] * self.num_nodes
def run_test(self):
self.wallet = MiniWallet(self.nodes[0])
diff --git a/test/functional/mempool_reorg.py b/test/functional/mempool_reorg.py
--- a/test/functional/mempool_reorg.py
+++ b/test/functional/mempool_reorg.py
@@ -16,13 +16,8 @@
class MempoolCoinbaseTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
- self.extra_args = [
- # immediate tx relay
- [
- "-whitelist=noban@127.0.0.1",
- ],
- [],
- ]
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
def run_test(self):
wallet = MiniWallet(self.nodes[0])
diff --git a/test/functional/p2p_1p1c_network.py b/test/functional/p2p_1p1c_network.py
--- a/test/functional/p2p_1p1c_network.py
+++ b/test/functional/p2p_1p1c_network.py
@@ -26,15 +26,9 @@
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 4
- self.extra_args = [
- [
- "-acceptnonstdtxn=1",
- "-maxmempool=5",
- # hugely speeds up the test, as it involves multiple hops of tx
- # relay.
- "-whitelist=noban@127.0.0.1",
- ]
- ] * self.num_nodes
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
+ self.extra_args = [["-acceptnonstdtxn=1", "-maxmempool=5"]] * self.num_nodes
self.supports_cli = False
def raise_network_minfee(self):
diff --git a/test/functional/p2p_feefilter.py b/test/functional/p2p_feefilter.py
--- a/test/functional/p2p_feefilter.py
+++ b/test/functional/p2p_feefilter.py
@@ -45,18 +45,17 @@
class FeeFilterTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
# We lower the various required feerates for this test
# to catch a corner-case where feefilter used to slightly undercut
# mempool and wallet feerate calculation based on GetFee
# rounding down 3 places, leading to stranded transactions.
# See issue #16499
- # grant noban permission to all peers to speed up tx relay / mempool
- # sync
self.extra_args = [
[
"-minrelaytxfee=1",
"-mintxfee=1",
- "-whitelist=noban@127.0.0.1",
]
] * self.num_nodes
diff --git a/test/functional/p2p_filter.py b/test/functional/p2p_filter.py
--- a/test/functional/p2p_filter.py
+++ b/test/functional/p2p_filter.py
@@ -95,12 +95,9 @@
class FilterTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
- self.extra_args = [
- [
- "-peerbloomfilters",
- "-whitelist=noban@127.0.0.1", # immediate tx relay
- ]
- ]
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
+ self.extra_args = [["-peerbloomfilters"]]
def generatetoscriptpubkey(self, scriptpubkey):
"""Helper to generate a single block to the given scriptPubKey."""
diff --git a/test/functional/p2p_invalid_block.py b/test/functional/p2p_invalid_block.py
--- a/test/functional/p2p_invalid_block.py
+++ b/test/functional/p2p_invalid_block.py
@@ -33,7 +33,8 @@
def set_test_params(self):
self.num_nodes = 1
self.setup_clean_chain = True
- self.extra_args = [["-whitelist=noban@127.0.0.1"]]
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
def run_test(self):
# Add p2p connection to node0
diff --git a/test/functional/rpc_packages.py b/test/functional/rpc_packages.py
--- a/test/functional/rpc_packages.py
+++ b/test/functional/rpc_packages.py
@@ -19,7 +19,8 @@
def set_test_params(self):
self.num_nodes = 1
self.setup_clean_chain = True
- self.extra_args = [["-whitelist=noban@127.0.0.1"]]
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
def assert_testres_equal(self, package_hex, testres_expected):
"""Shuffle package_hex and assert that the testmempoolaccept result
diff --git a/test/functional/rpc_rawtransaction.py b/test/functional/rpc_rawtransaction.py
--- a/test/functional/rpc_rawtransaction.py
+++ b/test/functional/rpc_rawtransaction.py
@@ -48,10 +48,8 @@
def set_test_params(self):
self.num_nodes = 3
self.extra_args = [["-txindex"], ["-txindex"], ["-txindex"]]
- # whitelist all peers to speed up tx relay / mempool sync
- for args in self.extra_args:
- args.append("-whitelist=noban@127.0.0.1")
-
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.supports_cli = False
def skip_test_if_missing_module(self):
diff --git a/test/functional/setup_scripts/chronik-client_websocket.py b/test/functional/setup_scripts/chronik-client_websocket.py
--- a/test/functional/setup_scripts/chronik-client_websocket.py
+++ b/test/functional/setup_scripts/chronik-client_websocket.py
@@ -28,6 +28,8 @@
class ChronikClient_Websocket_Setup(SetupFramework):
def set_test_params(self):
self.num_nodes = 1
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[
"-chronik",
@@ -38,7 +40,6 @@
"-avaminavaproofsnodecount=0",
"-persistavapeers=0",
"-acceptnonstdtxn=1",
- "-whitelist=noban@127.0.0.1",
]
]
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -106,6 +106,7 @@
"""Sets test framework defaults. Do not override this method. Instead, override the set_test_params() method"""
self.chain: str = "regtest"
self.setup_clean_chain: bool = False
+ self.noban_tx_relay: bool = False
self.nodes: List[TestNode] = []
self.network_thread = None
# Wait for up to 60 seconds for the RPC server to respond
@@ -567,6 +568,11 @@
extra_confs = [[]] * num_nodes
if extra_args is None:
extra_args = [[]] * num_nodes
+ # Whitelist peers to speed up tx relay / mempool sync.
+ # Don't use it if testing tx relay or timing.
+ if self.noban_tx_relay:
+ for i in range(len(extra_args)):
+ extra_args[i] = extra_args[i] + ["-whitelist=noban,in,out@127.0.0.1"]
if binary is None:
binary = [self.options.bitcoind] * num_nodes
assert_equal(len(extra_confs), num_nodes)
diff --git a/test/functional/wallet_abandonconflict.py b/test/functional/wallet_abandonconflict.py
--- a/test/functional/wallet_abandonconflict.py
+++ b/test/functional/wallet_abandonconflict.py
@@ -21,8 +21,7 @@
self.num_nodes = 2
self.extra_args = [["-minrelaytxfee=10"], []]
# whitelist peers to speed up tx relay / mempool sync
- for args in self.extra_args:
- args.append("-whitelist=noban@127.0.0.1")
+ self.noban_tx_relay = True
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
diff --git a/test/functional/wallet_address_types.py b/test/functional/wallet_address_types.py
--- a/test/functional/wallet_address_types.py
+++ b/test/functional/wallet_address_types.py
@@ -43,8 +43,8 @@
class AddressTypeTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 5
- # whitelist all peers to speed up tx relay / mempool sync
- self.extra_args = [["-whitelist=noban@127.0.0.1"]] * self.num_nodes
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
diff --git a/test/functional/wallet_avoidreuse.py b/test/functional/wallet_avoidreuse.py
--- a/test/functional/wallet_avoidreuse.py
+++ b/test/functional/wallet_avoidreuse.py
@@ -77,9 +77,8 @@
class AvoidReuseTest(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
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
diff --git a/test/functional/wallet_backup.py b/test/functional/wallet_backup.py
--- a/test/functional/wallet_backup.py
+++ b/test/functional/wallet_backup.py
@@ -43,13 +43,14 @@
def set_test_params(self):
self.num_nodes = 4
self.setup_clean_chain = True
- # nodes 1, 2,3 are spenders, let's give them a keypool=100
- # whitelist all peers to speed up tx relay / mempool sync
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
+ # nodes 1, 2, 3 are spenders, let's give them a keypool=100
self.extra_args = [
- ["-whitelist=noban@127.0.0.1", "-keypool=100"],
- ["-whitelist=noban@127.0.0.1", "-keypool=100"],
- ["-whitelist=noban@127.0.0.1", "-keypool=100"],
- ["-whitelist=noban@127.0.0.1"],
+ ["-keypool=100"],
+ ["-keypool=100"],
+ ["-keypool=100"],
+ [],
]
self.rpc_timeout = 120
diff --git a/test/functional/wallet_balance.py b/test/functional/wallet_balance.py
--- a/test/functional/wallet_balance.py
+++ b/test/functional/wallet_balance.py
@@ -47,7 +47,7 @@
self.num_nodes = 2
self.setup_clean_chain = True
# whitelist peers to speed up tx relay / mempool sync
- self.extra_args = [["-whitelist=noban@127.0.0.1"]] * self.num_nodes
+ self.noban_tx_relay = True
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py
--- a/test/functional/wallet_basic.py
+++ b/test/functional/wallet_basic.py
@@ -20,12 +20,11 @@
class WalletTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 4
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.setup_clean_chain = True
self.extra_args = [
- [
- "-acceptnonstdtxn=1",
- "-whitelist=noban@127.0.0.1",
- ],
+ ["-acceptnonstdtxn=1"],
] * self.num_nodes
self.supports_cli = False
diff --git a/test/functional/wallet_groups.py b/test/functional/wallet_groups.py
--- a/test/functional/wallet_groups.py
+++ b/test/functional/wallet_groups.py
@@ -13,6 +13,8 @@
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 5
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
self.extra_args = [
[],
[],
@@ -24,9 +26,6 @@
["-maxapsfee=2.93"],
["-maxapsfee=2.94"],
]
- # whitelist peers to speed up tx relay / mempool sync
- for args in self.extra_args:
- args.append("-whitelist=noban@127.0.0.1")
self.rpc_timeout = 480
self.supports_cli = False
diff --git a/test/functional/wallet_hd.py b/test/functional/wallet_hd.py
--- a/test/functional/wallet_hd.py
+++ b/test/functional/wallet_hd.py
@@ -17,8 +17,7 @@
self.num_nodes = 2
self.extra_args = [[], ["-keypool=0"]]
# whitelist peers to speed up tx relay / mempool sync
- for args in self.extra_args:
- args.append("-whitelist=noban@127.0.0.1")
+ self.noban_tx_relay = True
self.supports_cli = False
diff --git a/test/functional/wallet_import_rescan.py b/test/functional/wallet_import_rescan.py
--- a/test/functional/wallet_import_rescan.py
+++ b/test/functional/wallet_import_rescan.py
@@ -156,6 +156,8 @@
self.num_nodes = 2 + len(IMPORT_NODES)
self.supports_cli = False
self.rpc_timeout = 120
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
diff --git a/test/functional/wallet_importdescriptors.py b/test/functional/wallet_importdescriptors.py
--- a/test/functional/wallet_importdescriptors.py
+++ b/test/functional/wallet_importdescriptors.py
@@ -29,10 +29,9 @@
class ImportDescriptorsTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
- self.extra_args = [[], ["-keypool=5"]]
# whitelist peers to speed up tx relay / mempool sync
- for args in self.extra_args:
- args.append("-whitelist=noban@127.0.0.1")
+ self.noban_tx_relay = True
+ self.extra_args = [[], ["-keypool=5"]]
self.setup_clean_chain = True
def skip_test_if_missing_module(self):
diff --git a/test/functional/wallet_listreceivedby.py b/test/functional/wallet_listreceivedby.py
--- a/test/functional/wallet_listreceivedby.py
+++ b/test/functional/wallet_listreceivedby.py
@@ -18,7 +18,7 @@
def set_test_params(self):
self.num_nodes = 2
# whitelist peers to speed up tx relay / mempool sync
- self.extra_args = [["-whitelist=noban@127.0.0.1"]] * self.num_nodes
+ self.noban_tx_relay = True
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
diff --git a/test/functional/wallet_listsinceblock.py b/test/functional/wallet_listsinceblock.py
--- a/test/functional/wallet_listsinceblock.py
+++ b/test/functional/wallet_listsinceblock.py
@@ -22,8 +22,7 @@
self.setup_clean_chain = True
self.extra_args = [["-noparkdeepreorg"], ["-noparkdeepreorg"], [], []]
# whitelist peers to speed up tx relay / mempool sync
- for args in self.extra_args:
- args.append("-whitelist=noban@127.0.0.1")
+ self.noban_tx_relay = True
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
diff --git a/test/functional/wallet_listtransactions.py b/test/functional/wallet_listtransactions.py
--- a/test/functional/wallet_listtransactions.py
+++ b/test/functional/wallet_listtransactions.py
@@ -12,9 +12,8 @@
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
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
diff --git a/test/functional/wallet_send.py b/test/functional/wallet_send.py
--- a/test/functional/wallet_send.py
+++ b/test/functional/wallet_send.py
@@ -18,15 +18,8 @@
class WalletSendTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
- # whitelist all peers to speed up tx relay / mempool sync
- self.extra_args = [
- [
- "-whitelist=127.0.0.1",
- ],
- [
- "-whitelist=127.0.0.1",
- ],
- ]
+ # whitelist peers to speed up tx relay / mempool sync
+ self.noban_tx_relay = True
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 20, 20:35 (14 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5865894
Default Alt Text
D17115.id50789.diff (40 KB)
Attached To
D17115: test: add option to speed up tx relay/mempool sync
Event Timeline
Log In to Comment