Repository navigation
test: clean message_count and last_message - #19599
Merged
Merged
Conversation
This commit clarifies the intended usage of message_count and last_message. Additionally it changes the only usage of message_count to using last_message instead, bringing the code further along the intended usage.
jnewbery
reviewed
Jul 27, 2020
jnewbery
left a comment
Contributor
There was a problem hiding this comment.
Comment changes seem good, but I don't think the code change is necessary.
| def wait_for_verack(self, timeout=60): | ||
| def test_function(): | ||
| return self.message_count["verack"] | ||
| return "verack" in self.last_message |
Contributor
There was a problem hiding this comment.
why this change? I think waiting for self.message_count["verack"] to be non-zero matches exactly what we want the function to do.
EDIT: All the other wait_for* functions are using last_message so this change seems fine to me.
Contributor
|
utACK 2c6a02e |
Fabcien
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
Sep 6, 2021
Summary: This commit clarifies the intended usage of message_count and last_message. Additionally it changes the only usage of message_count to using last_message instead, bringing the code further along the intended usage. This is a backport of [[bitcoin/bitcoin#19599 | core#19599]] Test Plan: `ninja check-functional` Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D10047
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Sep 19, 2021
2c6a02e Clean message_count and last_message (Troy Giorshev) Pull request description: From bitcoin#19580 This PR changes comments to clarify the intended usage of `message_count` and `last_message`. Additionally it changes the only usage of `message_count` to use `last_message` instead, bringing the code into alignment with the intended usage. Note: Now `message_count` is completely unused. However, it is ready to be used (i.e. the supporting code works) and likely will be used in some test in the future. ACKs for top commit: jnewbery: utACK 2c6a02e Tree-SHA512: 07c7684c9586de4f845e10d7aac36c1aab9fb56b409949c1c70d5ca705bc3971ca7d5943245a0472def4efd7b4e1c5dad2f713db5ead8fca08404daf4891e98b
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.
From #19580
This PR changes comments to clarify the intended usage of
message_countandlast_message. Additionally it changes the only usage ofmessage_countto uselast_messageinstead, bringing the code into alignment with the intended usage.Note: Now
message_countis completely unused. However, it is ready to be used (i.e. the supporting code works) and likely will be used in some test in the future.