QA/mininode: Send all headers upfront in send_blocks_and_test to avoid sending an unconnected one #15897

pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:qa_mininode_headers changing 1 files +1 −1
  1. luke-jr commented at 8:49 PM on April 25, 2019: member

    While this doesn't currently trigger any problems, the network protocol does expect headers to be sent connectable in normal circumstances, and if too many are sent out of order will disconnect the peer.

  2. QA/mininode: Send all headers upfront in send_blocks_and_test to avoid sending an unconnected one 9f9db39041
  3. DrahtBot added the label Tests on Apr 25, 2019
  4. in test/functional/test_framework/mininode.py:537 in 9f9db39041
     533 | @@ -534,7 +534,7 @@ def send_blocks_and_test(self, blocks, node, *, success=True, force_send=False,
     534 |                  for b in blocks:
     535 |                      self.send_message(msg_block(block=b))
     536 |              else:
     537 | -                self.send_message(msg_headers([CBlockHeader(blocks[-1])]))
     538 | +                self.send_message(msg_headers([CBlockHeader(block) for block in blocks]))
    


    MarcoFalke commented at 5:20 PM on April 26, 2019:

    I think we want to send only the latest header and wait for the other side to ask for all on its own.


    luke-jr commented at 5:37 PM on April 26, 2019:

    That's currently considered a network protocol error...?


    MarcoFalke commented at 7:03 PM on April 29, 2019:

    Eh, yeah

  5. MarcoFalke merged this on Apr 29, 2019
  6. MarcoFalke closed this on Apr 29, 2019

  7. MarcoFalke referenced this in commit ce6762030f on Apr 29, 2019
  8. jasonbcox referenced this in commit a421408bfa on Oct 6, 2020
  9. vijaydasmp referenced this in commit cb487cc5f7 on Nov 12, 2021
  10. vijaydasmp referenced this in commit 0e4dcca916 on Nov 12, 2021
  11. vijaydasmp referenced this in commit e49abf71ba on Nov 16, 2021
  12. vijaydasmp referenced this in commit 76324344e2 on Nov 17, 2021
  13. vijaydasmp referenced this in commit 02df0ac51d on Nov 21, 2021
  14. vijaydasmp referenced this in commit 87960509df on Nov 21, 2021
  15. DrahtBot locked this on Dec 16, 2021
Contributors
Labels

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

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