[qa] Fixes segwit block relay test after inv-direct-fetch was disabled #10134

pull sdaftuar wants to merge 1 commits into bitcoin:master from sdaftuar:2017-03-fix-segwit-relay-test changing 1 files +6 −11
  1. sdaftuar commented at 5:26 PM on March 31, 2017: member

    This test was passing because we never fetch blocks if we only receive an inv and not the header (after 037159cebf1eae4445050cec029986514ed4e9e2), and this test wasn't delivering the header.

    I noticed the test falsely passing when I intentionally broke this behavior in one of my branches.

  2. jnewbery commented at 8:14 PM on March 31, 2017: member

    announce_block() is only called from one place. I'd be tempted to remove the method entirely and explicitly call send_message(<msg_header>) from the test case so it's obvious to the reader what's happening.

  3. fanquake added the label Tests on Mar 31, 2017
  4. sdaftuar force-pushed on Apr 13, 2017
  5. sdaftuar force-pushed on Apr 14, 2017
  6. sdaftuar commented at 4:21 PM on April 14, 2017: member

    Updated to remove announce_block().

  7. MarcoFalke added the label P2P on Apr 14, 2017
  8. in test/functional/p2p-segwit.py:1032 in c8e316bc3d outdated
    1091 |              # and then check to see if that particular getdata has been received.
    1092 | -            self.old_node.announce_block(block4, use_header=False)
    1093 | +            # Since 0.14, inv's will only be responded to with a getheaders, so send a header
    1094 | +            # to announce this block.
    1095 | +            msg = msg_headers()
    1096 | +            msg.headers = [ CBlockHeader(block4) ]
    


    jnewbery commented at 1:18 PM on April 17, 2017:

    nit: spaces aren't required around list elements within brackets: https://www.python.org/dev/peps/pep-0008/#pet-peeves


    sdaftuar commented at 5:01 PM on April 18, 2017:

    I prefer the space there, otherwisethetextlookstoosquishedtome, so I'll leave this (until we merge a style guide for the project that calls for removing them).

  9. jnewbery approved
  10. jnewbery commented at 1:19 PM on April 17, 2017: member

    Tested ACK c8e316bc3dd152a2d36a947195fe4b96ca4d34db

    One small style nit. Up to you whether you take it or leave it.

  11. [qa] Fixes segwit block relay test after inv-direct-fetch was disabled
    This test was passing because we never fetch blocks if we only receive
    an inv and not the header (after 037159cebf1eae4445050cec029986514ed4e9e2),
    and this test wasn't delivering the header.
    f19abd9053
  12. sdaftuar force-pushed on May 6, 2017
  13. sdaftuar commented at 9:26 AM on May 6, 2017: member

    Rebased

  14. MarcoFalke commented at 10:07 AM on May 6, 2017: member

    utACK f19abd90537fe71e757fdbfc52cd2288e967bb6e

  15. MarcoFalke merged this on May 6, 2017
  16. MarcoFalke closed this on May 6, 2017

  17. MarcoFalke referenced this in commit 314ebdfcb3 on May 6, 2017
  18. MarcoFalke locked this on Sep 8, 2021

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-14 12:15 UTC

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