Repository navigation
test: Remove message_count - #19580
troygiorshev wants to merge 1 commit into
Conversation
message_count is almost completely unused. Additionally, the values it holds are no longer correct. This commit removes it and replaces its only use with a new has_verack boolean.
|
I don't understand why the counts would not be correct, but agree |
In the tests in #18638, we do Thanks for the comment, I've edited the PR description to clarify what I mean by "wrong". |
|
I don't think this is an improvement. It's making the I also don't think that it's an issue that EDIT: This is not a NACK. I don't see the benefit of removing this, but if other people do, I don't feel strongly that it needs to stay. |
|
Code review ACK daad490.
@jnewbery what do you mean?
👍 |
|
Closing this in favor of #19599 I misunderstood the intended usage of I now agree with:
If people are uncomfortable with unused code, this PR can be reopened but should use 2020-07-remove-message_count-v2 instead. It does away with |
2c6a02e Clean message_count and last_message (Troy Giorshev) Pull request description: From #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
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
Inspired by this comment on #18638.
message_countis almost completely unused. Additionally, its values are not always consistent withlast_message(i.e. we sometimes simultaneously havemessage_count['foo'] == 1and'foo' not in last_message).This PR removes it and replaces its only use with a new
has_verackboolean.