test: Fix intermittent failure in rpc_net.py#26553
Merged
maflcko merged 1 commit intobitcoin:masterfrom Nov 22, 2022
Merged
Conversation
The wait in disconnect_p2ps checked for subver, which is unavailable for the peer that didn't send a version msg.
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
|
Member
|
ACK 0f6cd72 |
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Nov 22, 2022
0f6cd72 test: Fix intermittent failure in rpc_net.py (Martin Zumsande) Pull request description: Fixes bitcoin#26552. The problem was that calling `disconnect_p2ps` waits until `self.num_test_p2p_connections() == 0`. `num_test_p2p_connections()` checks the field `subver` in `getpeerinfo` to distinguish p2p nodes from full nodes. However, if we are dealing with a p2p connection that has never sent a version, the node has never received the special subversion and the wait is ineffective (we continue even though the disconnection is not yet completed). Fix this by not using `disconnect_p2ps`. ACKs for top commit: MarcoFalke: ACK 0f6cd72 Tree-SHA512: ebdc78498db6971ae2f9b494dc76b35de46155bf191ce82ee04162592d0d9ec1272901992406d530fa46fb52cd815c4b91350824578292df14986584bc60b90a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #26552.
The problem was that calling
disconnect_p2pswaits untilself.num_test_p2p_connections() == 0.num_test_p2p_connections()checks the fieldsubveringetpeerinfoto distinguish p2p nodes from full nodes.However, if we are dealing with a p2p connection that has never sent a version, the node has never received the special subversion and the wait is ineffective (we continue even though the disconnection is not yet completed).
Fix this by not using
disconnect_p2ps.