test: bring p2p_leak.py up to date #21345

pull mzumsande wants to merge 1 commits into bitcoin:master from mzumsande:202103_p2p_leak changing 1 files +46 −18
  1. mzumsande commented at 11:37 PM on March 2, 2021: member

    After the introduction of wtxidrelay and sendaddrv2 messages during version handshake, extend p2p_leak.py test to reflect this. Also, some minor fixes and doc improvements.

    I also added a test that peers not completing the version handshake will be disconnected for timeout, as suggested by MarcoFalke in #19723 (comment).

  2. test: bring p2p_leak.py up to date.
    After the introduction of wtxidrelay and sendaddrv2 messages during
    version handshake, extend p2p_leak.py test to reflect this.
    Also, some minor fixes and doc improvements.
    a061a29970
  3. fanquake added the label Tests on Mar 2, 2021
  4. in test/functional/p2p_leak.py:43 in a061a29970
      39 | +        self.got_sendaddrv2 = False
      40 |  
      41 |      def bad_message(self, message):
      42 |          self.unexpected_msg = True
      43 | -        self.log.info("should not have received message: %s" % message.msgtype)
      44 | +        print("should not have received message: %s" % message.msgtype)
    


    brunoerg commented at 12:40 AM on March 3, 2021:

    Is there a reason to replace self.log.info with print?


    mzumsande commented at 12:50 AM on March 3, 2021:

    Yes - I think it would have caused a crash before because we are inside P2PInterface which doesn't have a log - only BitcoinTestFramework does.

  5. brunoerg commented at 12:34 PM on March 3, 2021: member

    Tested ACK a061a299708d39ad63f85085ae07c457308823cf

    • Tested on MacOS BigSur 11.1
    • Ran several times successfully
    • Docs improvements seem great

    Screen Shot 2021-03-03 at 08 44 53

  6. theStack approved
  7. theStack commented at 10:55 PM on March 4, 2021: member

    Tested ACK a061a299708d39ad63f85085ae07c457308823cf

  8. MarcoFalke merged this on Mar 5, 2021
  9. MarcoFalke closed this on Mar 5, 2021

  10. sidhujag referenced this in commit 40a78b38ba on Mar 5, 2021
  11. mzumsande deleted the branch on Mar 22, 2021
  12. DrahtBot locked this on Aug 16, 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-17 03:14 UTC

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