test: clean message_count and last_message #19599

pull troygiorshev wants to merge 1 commits into bitcoin:master from troygiorshev:2020-07-clean-message_count changing 1 files +7 −3
  1. troygiorshev commented at 12:01 PM on July 27, 2020: contributor

    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.

  2. Clean message_count and last_message
    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.
    2c6a02e024
  3. troygiorshev renamed this:
    Clean message_count and last_message
    test: clean message_count and last_message
    on Jul 27, 2020
  4. fanquake added the label Tests on Jul 27, 2020
  5. in test/functional/test_framework/mininode.py:479 in 2c6a02e024
     475 | @@ -472,7 +476,7 @@ def test_function():
     476 |  
     477 |      def wait_for_verack(self, timeout=60):
     478 |          def test_function():
     479 | -            return self.message_count["verack"]
     480 | +            return "verack" in self.last_message
    


    jnewbery commented at 4:10 PM on July 27, 2020:

    ~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.

  6. jnewbery commented at 4:10 PM on July 27, 2020: member

    Comment changes seem good, but I don't think the code change is necessary.

  7. jnewbery commented at 2:09 PM on July 29, 2020: member

    utACK 2c6a02e0248825e205e6deea4c38409044feb4ab

  8. MarcoFalke merged this on Jul 30, 2020
  9. MarcoFalke closed this on Jul 30, 2020

  10. sidhujag referenced this in commit 64a985d7fc on Jul 31, 2020
  11. Fabcien referenced this in commit 52877e4558 on Sep 6, 2021
  12. PastaPastaPasta referenced this in commit ed7060338a on Sep 17, 2021
  13. PastaPastaPasta referenced this in commit 6d48f06071 on Sep 19, 2021
  14. thelazier referenced this in commit 14934edaaf on Sep 25, 2021
  15. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-26 12:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me