-
Notifications
You must be signed in to change notification settings - Fork 36k
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
tests: Remove getnettotals/getpeerinfo consistency test #20258
Merged
maflcko
merged 1 commit into
bitcoin:master
from
jnewbery:2020-10-remove-net-totals-test
Oct 28, 2020
Merged
tests: Remove getnettotals/getpeerinfo consistency test #20258
maflcko
merged 1 commit into
bitcoin:master
from
jnewbery:2020-10-remove-net-totals-test
Oct 28, 2020
Conversation
This file contains 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
We make no guarantees about consistency between RPC calls.
review ACK 778cd0d |
ACK 778cd0d after reading discussion on 18784, code review, ran test |
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Oct 28, 2020
…cy test 778cd0d [tests] Remove getnettotals/getpeerinfo consistency test (John Newbery) Pull request description: We make no guarantees about consistency between RPC calls. Alternative to 18784 ACKs for top commit: MarcoFalke: review ACK 778cd0d troygiorshev: ACK 778cd0d after reading discussion on 18784, code review, ran test Tree-SHA512: 438333a111cc93a09680cec47f13fbe03557d4803e5d826aec6f72e5afea62a088622645f0756e8fd2c9182c2a69ccca867d4d6fed2250364bee2b6c834adb1a
maflcko
reviewed
Nov 4, 2020
peer_info_after_ping = self.nodes[0].getpeerinfo() | ||
for before, after in zip(peer_info, peer_info_after_ping): | ||
peer_info_after = self.nodes[0].getpeerinfo() | ||
for before, after in zip(peer_info_before, peer_info_after): | ||
assert_greater_than_or_equal(after['bytesrecv_per_msg'].get('pong', 0), before['bytesrecv_per_msg'].get('pong', 0) + 32) | ||
assert_greater_than_or_equal(after['bytessent_per_msg'].get('ping', 0), before['bytessent_per_msg'].get('ping', 0) + 32) |
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.
This still assumes they are synchronised/consistent. the assert should be replaced by a wait_until. See #20299
deadalnix
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
Dec 21, 2021
Summary: [[bitcoin/bitcoin#20258 | core#20258]]: > The `CNode` member `nSendBytes` is incremented under the node's lock `cs_vSend`. However, `RecordBytesSent` is not. An RPC thread that acquires the `cs_vSend` lock puts the message handler thread on hold. While the thread is on hold, `getnettotals` returns "stale" values or values that don't add up. > > We make no guarantees about consistency between RPC calls. [[bitcoin/bitcoin#20299 | core#20299]] > The test fails intermittently because getpeerinfo and getnettotals are not synchronised, so a wait_until is needed for each RPC (separately). This is a backport of [[bitcoin/bitcoin#20258 | core#20258]] and [[bitcoin/bitcoin#20299 | core#20299]] Test Plan: `test/functional/test_runner.py rpc_net.py` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D10706
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.
We make no guarantees about consistency between RPC calls.
Alternative to 18784