Skip to content

Commit 7e2d435

Browse files
committed
merge bitcoin#29483: add --v1transport option, add --v2transport to a CI task
1 parent 7e59a96 commit 7e2d435

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

ci/test/00_setup_env_native_multiprocess.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ export CONTAINER_NAME=ci_native_multiprocess
1010
export PACKAGES="cmake python3 llvm clang"
1111
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
1212
export GOAL="install"
13+
export TEST_RUNNER_EXTRA="--v2transport"
1314
export BITCOIN_CONFIG="--with-boost-process --enable-debug CC=clang CXX=clang++" # Use clang to avoid OOM
1415
export TEST_RUNNER_ENV="BITCOIND=dash-node"

test/functional/test_framework/test_framework.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ def parse_args(self):
225225
parser.add_argument('--timeout-factor', dest="timeout_factor", type=float, default=1.0, help='adjust test timeouts by a factor. Setting it to 0 disables all timeouts')
226226
parser.add_argument("--v2transport", dest="v2transport", default=False, action="store_true",
227227
help="use BIP324 v2 connections between all nodes by default")
228+
parser.add_argument("--v1transport", dest="v1transport", default=False, action="store_true",
229+
help="Explicitly use v1 transport (can be used to overwrite global --v2transport option)")
228230

229231
group = parser.add_mutually_exclusive_group()
230232
group.add_argument("--descriptors", action='store_const', const=True,
@@ -239,6 +241,8 @@ def parse_args(self):
239241
config = configparser.ConfigParser()
240242
config.read_file(open(self.options.configfile))
241243
self.config = config
244+
if self.options.v1transport:
245+
self.options.v2transport=False
242246

243247
# Running TestShell in a Jupyter notebook causes an additional -f argument
244248
# To keep TestShell from failing with an "unrecognized argument" error, we add a dummy "-f" argument

test/functional/test_framework/test_node.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,7 @@ def __init__(self, i, datadir, extra_args_from_options, *, chain, rpchost, timew
137137
self.args.append("-v2transport=1")
138138
else:
139139
self.args.append("-v2transport=0")
140-
else:
141-
# v2transport requested but not supported for node
142-
assert not v2transport
140+
# if v2transport is requested via global flag but not supported for node version, ignore it
143141

144142
self.cli = TestNodeCLI(bitcoin_cli, self.datadir)
145143
self.use_cli = use_cli

test/functional/test_runner.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
'wallet_basic.py --descriptors',
114114
'wallet_labels.py --legacy-wallet',
115115
'wallet_labels.py --descriptors',
116-
'p2p_timeouts.py',
116+
'p2p_timeouts.py --v1transport',
117117
'p2p_timeouts.py --v2transport',
118118
'feature_bip68_sequence.py',
119119
'mempool_updatefromblock.py',
@@ -178,7 +178,7 @@
178178
'wallet_avoidreuse.py --descriptors',
179179
'mempool_reorg.py',
180180
'mempool_persist.py',
181-
'p2p_block_sync.py',
181+
'p2p_block_sync.py --v1transport',
182182
'p2p_block_sync.py --v2transport',
183183
'wallet_multiwallet.py --legacy-wallet',
184184
'wallet_multiwallet.py --descriptors',
@@ -208,15 +208,15 @@
208208
'p2p_addrv2_relay.py',
209209
'wallet_groups.py --legacy-wallet',
210210
'wallet_groups.py --descriptors',
211-
'p2p_compactblocks_hb.py',
211+
'p2p_compactblocks_hb.py --v1transport',
212212
'p2p_compactblocks_hb.py --v2transport',
213-
'p2p_disconnect_ban.py',
213+
'p2p_disconnect_ban.py --v1transport',
214214
'p2p_disconnect_ban.py --v2transport',
215215
'feature_addressindex.py',
216216
'feature_timestampindex.py',
217217
'feature_spentindex.py',
218218
'rpc_decodescript.py',
219-
'rpc_blockchain.py',
219+
'rpc_blockchain.py --v1transport',
220220
'rpc_blockchain.py --v2transport',
221221
'rpc_deprecated.py',
222222
'wallet_disable.py --legacy-wallet',
@@ -227,7 +227,7 @@
227227
'p2p_getaddr_caching.py',
228228
'p2p_getdata.py',
229229
'p2p_addrfetch.py',
230-
'rpc_net.py',
230+
'rpc_net.py --v1transport',
231231
'rpc_net.py --v2transport',
232232
'wallet_keypool.py --legacy-wallet',
233233
'wallet_keypool_hd.py --legacy-wallet',
@@ -236,14 +236,14 @@
236236
'p2p_nobloomfilter_messages.py',
237237
'p2p_filter.py',
238238
'p2p_blocksonly.py',
239-
'rpc_setban.py',
239+
'rpc_setban.py --v1transport',
240240
'rpc_setban.py --v2transport',
241241
'mining_prioritisetransaction.py',
242242
'p2p_invalid_locator.py',
243-
'p2p_invalid_block.py',
243+
'p2p_invalid_block.py --v1transport',
244244
'p2p_invalid_block.py --v2transport',
245245
'p2p_invalid_messages.py',
246-
'p2p_invalid_tx.py',
246+
'p2p_invalid_tx.py --v1transport',
247247
'p2p_invalid_tx.py --v2transport',
248248
'p2p_v2_transport.py',
249249
'p2p_v2_encrypted.py',
@@ -270,12 +270,12 @@
270270
'rpc_preciousblock.py',
271271
'wallet_importprunedfunds.py --legacy-wallet',
272272
'wallet_importprunedfunds.py --descriptors',
273-
'p2p_leak_tx.py',
273+
'p2p_leak_tx.py --v1transport',
274274
'p2p_leak_tx.py --v2transport',
275275
'p2p_eviction.py',
276-
'p2p_ibd_stalling.py',
276+
'p2p_ibd_stalling.py --v1transport',
277277
'p2p_ibd_stalling.py --v2transport',
278-
'p2p_net_deadlock.py',
278+
'p2p_net_deadlock.py --v1transport',
279279
'p2p_net_deadlock.py --v2transport',
280280
'rpc_signmessage.py',
281281
'rpc_generateblock.py',
@@ -367,7 +367,7 @@
367367
'feature_anchors.py',
368368
'feature_coinstatsindex.py',
369369
'wallet_orphanedreward.py',
370-
'p2p_node_network_limited.py',
370+
'p2p_node_network_limited.py --v1transport',
371371
'p2p_node_network_limited.py --v2transport',
372372
'p2p_permissions.py',
373373
'feature_blocksdir.py',

0 commit comments

Comments
 (0)