Fixes #18832
test: Fix verack race to avoid intermittent test failures #18866
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2005-qaVerackRace changing 1 files +5 −1-
MarcoFalke commented at 12:56 PM on May 4, 2020: member
-
test: Fix verack race to avoid intermittent test failures fae153b409
- MarcoFalke force-pushed on May 4, 2020
- laanwj added the label P2P on May 4, 2020
- laanwj added the label Tests on May 4, 2020
- laanwj removed the label P2P on May 4, 2020
-
in test/functional/test_framework/util.py:398 in fae153b409
390 | @@ -391,7 +391,11 @@ def connect_nodes(from_connection, node_num): 391 | from_connection.addnode(ip_port, "onetry") 392 | # poll until version handshake complete to avoid race conditions 393 | # with transaction relaying 394 | - wait_until(lambda: all(peer['version'] != 0 for peer in from_connection.getpeerinfo())) 395 | + # See comments in net_processing: 396 | + # * Must have a version message before anything else 397 | + # * Must have a verack message before anything else 398 | + wait_until(lambda: all(peer['version'] != 0 for peer in from_connection.getpeerinfo())) 399 | + wait_until(lambda: all(peer['bytesrecv_per_msg'].pop('verack', 0) == 24 for peer in from_connection.getpeerinfo()))
laanwj commented at 10:37 AM on May 6, 2020:It's slightly hacky to use the receive statistics here to see if the local peer has received the
verackmessage and completed the handshake. But the only way to do it without RPC changes, I suppose.
MarcoFalke commented at 3:09 PM on May 6, 2020:There is
fSuccessfullyConnectedor so, which should do the same thing, but yeah it is not exposed on RPClaanwj commented at 10:38 AM on May 6, 2020: memberACK fae153b40968bfd974a4709bcd841a59447abf18
MarcoFalke merged this on May 8, 2020MarcoFalke closed this on May 8, 2020MarcoFalke deleted the branch on May 8, 2020sidhujag referenced this in commit 231392771c on May 12, 2020ComputerCraftr referenced this in commit 28a494d680 on Jun 10, 2020ComputerCraftr referenced this in commit 45df3f5020 on Jun 10, 2020jasonbcox referenced this in commit a73453dd27 on Sep 12, 2020PastaPastaPasta referenced this in commit 190726ad49 on Jun 27, 2021PastaPastaPasta referenced this in commit fd6a732710 on Jun 28, 2021PastaPastaPasta referenced this in commit 7de0956a4c on Jun 29, 2021PastaPastaPasta referenced this in commit 608772114f on Jul 1, 2021PastaPastaPasta referenced this in commit 7c1ea4174a on Jul 1, 2021PastaPastaPasta referenced this in commit be891457d1 on Jul 14, 2021PastaPastaPasta referenced this in commit 8c1a763ccc on Jul 15, 2021DrahtBot locked this on Feb 15, 2022ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 21:14 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 21:14 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me