-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test: Fix verack race to avoid intermittent test failures #18866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| # * Must have a version message before anything else | ||
| # * Must have a verack message before anything else | ||
| wait_until(lambda: all(peer['version'] != 0 for peer in from_connection.getpeerinfo())) | ||
| wait_until(lambda: all(peer['bytesrecv_per_msg'].pop('verack', 0) == 24 for peer in from_connection.getpeerinfo())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's slightly hacky to use the receive statistics here to see if the local peer has received the verack message and completed the handshake. But the only way to do it without RPC changes, I suppose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is fSuccessfullyConnected or so, which should do the same thing, but yeah it is not exposed on RPC
|
ACK fae153b |
… failures fae153b test: Fix verack race to avoid intermittent test failures (MarcoFalke) Pull request description: Fixes bitcoin#18832 ACKs for top commit: laanwj: ACK fae153b Tree-SHA512: 071de8c8e2b2787c9433c7460e18b9a54beaf471a52ce848c5ac7263fc2a40f5b976d4f558ecc494fd0fa07284b7c98d29267cade58f80ab74fe9a7d18d94298
Summary:
fae153b40968bfd974a4709bcd841a59447abf18 test: Fix verack race to avoid intermittent test failures (MarcoFalke)
Pull request description:
Fixes #18832
ACKs for top commit:
laanwj:
ACK fae153b40968bfd974a4709bcd841a59447abf18
Tree-SHA512: 071de8c8e2b2787c9433c7460e18b9a54beaf471a52ce848c5ac7263fc2a40f5b976d4f558ecc494fd0fa07284b7c98d29267cade58f80ab74fe9a7d18d94298
Backport of Core [[bitcoin/bitcoin#18866 | PR18866]]
Test Plan: `ninja check-functional`
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D7434
… failures fae153b test: Fix verack race to avoid intermittent test failures (MarcoFalke) Pull request description: Fixes bitcoin#18832 ACKs for top commit: laanwj: ACK fae153b Tree-SHA512: 071de8c8e2b2787c9433c7460e18b9a54beaf471a52ce848c5ac7263fc2a40f5b976d4f558ecc494fd0fa07284b7c98d29267cade58f80ab74fe9a7d18d94298
… failures fae153b test: Fix verack race to avoid intermittent test failures (MarcoFalke) Pull request description: Fixes bitcoin#18832 ACKs for top commit: laanwj: ACK fae153b Tree-SHA512: 071de8c8e2b2787c9433c7460e18b9a54beaf471a52ce848c5ac7263fc2a40f5b976d4f558ecc494fd0fa07284b7c98d29267cade58f80ab74fe9a7d18d94298
Fixes #18832