Skip to content

Conversation

@theStack
Copy link
Contributor

@theStack theStack commented Dec 9, 2023

Asserting for the debug log message "Added connection peer=" is insufficient for ensuring that this new connection will show up in a following getpeerinfo() call, as the debug message is written in the CNode ctor, which means it hasn't necessarily been added to CConnman.m_nodes at this point.

Solve this by using the recently introduced wait_for_new_peer helper (see #29006, commit 00e0658), which is more robust.

Fixes #29030.

Asserting for the debug log message "Added connection peer=" is
insufficient for ensuring that this new connection will show up in a
following getpeerinfo() call, as the debug message is written in the
CNode ctor, which means it hasn't necessarily been added to
CConnman.m_nodes at this point.

Solve this by using the recently introduced `wait_for_new_peer`
helper, which is more robust.

Fixes bitcoin#29030.
@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 9, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK maflcko

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot added the Tests label Dec 9, 2023
@maflcko
Copy link
Member

maflcko commented Dec 9, 2023

lgtm ACK ea00f98

@fanquake fanquake merged commit 36fabb0 into bitcoin:master Dec 11, 2023
@theStack theStack deleted the 202312-test-fix_intermittent_error_in_rpc_net branch December 11, 2023 10:43
@bitcoin bitcoin locked and limited conversation to collaborators Dec 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: Intermittent issue in rpc_net.py

4 participants