aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_ibd_stalling.py
diff options
context:
space:
mode:
authorMartin Zumsande <mzumsande@gmail.com>2023-11-20 15:10:29 -0500
committerMartin Zumsande <mzumsande@gmail.com>2024-02-12 10:46:42 -0500
commitbf5662c678455fb47c402f8520215726ddfe7a94 (patch)
tree3b74b5f7760d1d7759bc567a8c59218f1b8ad215 /test/functional/p2p_ibd_stalling.py
parent6e9e39da434f8dafacee4cba068daf499bdb4cc2 (diff)
downloadbitcoin-bf5662c678455fb47c402f8520215726ddfe7a94.tar.xz
test: enable v2 for python p2p depending on global --v2transport flag
This changes the default behavior, individual tests can overwrite this option. As a result, it is possible to run the entire test suite with --v2transport, and all connections to the python p2p will then use it. Also adjust several tests that are already running with --v2transport in the test runner (although they actually made v1 connection before this change). This is done in the same commit so that there isn't an intermediate commit in which the CI fails.
Diffstat (limited to 'test/functional/p2p_ibd_stalling.py')
-rwxr-xr-xtest/functional/p2p_ibd_stalling.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/p2p_ibd_stalling.py b/test/functional/p2p_ibd_stalling.py
index 0eb37fa92f..830f374d63 100755
--- a/test/functional/p2p_ibd_stalling.py
+++ b/test/functional/p2p_ibd_stalling.py
@@ -80,7 +80,8 @@ class P2PIBDStallingTest(BitcoinTestFramework):
# Need to wait until 1023 blocks are received - the magic total bytes number is a workaround in lack of an rpc
# returning the number of downloaded (but not connected) blocks.
- self.wait_until(lambda: self.total_bytes_recv_for_blocks() == 172761)
+ bytes_recv = 172761 if not self.options.v2transport else 169692
+ self.wait_until(lambda: self.total_bytes_recv_for_blocks() == bytes_recv)
self.all_sync_send_with_ping(peers)
# If there was a peer marked for stalling, it would get disconnected