qa: Add test for orphan handling #13003

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:Mf1804-qaOrphans changing 3 files +116 −26
  1. MarcoFalke commented at 3:17 AM on April 17, 2018: member

    No description provided.

  2. qa: Add test for orphan handling fadfbd33ab
  3. fanquake added the label Tests on Apr 17, 2018
  4. practicalswift commented at 10:43 AM on April 17, 2018: contributor

    Concept ACK - nice!

  5. in test/functional/test_framework/mininode.py:563 in fadfbd33ab outdated
     559 |          """Send txs to test node and test whether they're accepted to the mempool.
     560 |  
     561 |           - add all txs to our tx_store
     562 |           - send tx messages for all txs
     563 | -         - if success is True: assert that the tx is accepted to the mempool
     564 | -         - if success is False: assert that the tx is not accepted to the mempool
    


    ryanofsky commented at 9:55 PM on April 17, 2018:

    "success is False" line unintentionally deleted?


    jamesob commented at 10:24 PM on April 17, 2018:

    It looks like including both "if success is ..." lines would be repetitive.


    ryanofsky commented at 10:43 PM on April 17, 2018:

    It is a little repetitive, but I think the description is vague without that line because "not asserting" and "asserting not" mean different things.

  6. in test/functional/feature_block.py:85 in fadfbd33ab outdated
      81 | @@ -82,10 +82,7 @@ def set_test_params(self):
      82 |      def run_test(self):
      83 |          node = self.nodes[0]  # convenience reference to the node
      84 |  
      85 | -        # reconnect_p2p() expects the network thread to be running
      86 | -        network_thread_start()
      87 | -
      88 | -        self.reconnect_p2p()
      89 | +        self.bootstrap_p2p()  # Add one p2p connection to the node
    


    ryanofsky commented at 10:01 PM on April 17, 2018:

    Note to reviewers: The updates in feature_block.py just tweak the network_thread_start/network_thread_join calls to happen in a more logical order, and be consistent with other tests. This is internal test cleanup which is not directly related to the other changes in this PR.

  7. in test/functional/p2p_invalid_tx.py:35 in fadfbd33ab outdated
      34 | +        """Add a P2P connection to the node.
      35 | +
      36 | +        Helper to connect and wait for version handshake."""
      37 | +        for _ in range(num_connections):
      38 | +            self.nodes[0].add_p2p_connection(P2PDataStore())
      39 | +        network_thread_start()
    


    ryanofsky commented at 10:07 PM on April 17, 2018:

    It would be logical to start the network thread adding connections, right? Just asking because it's weird to me to see shutdown order not be the reverse of initialization order like:

    network_thread_start()
    add_p2p_connection()
    ...
    disconnect_p2ps()
    network_thread_join()
    

    MarcoFalke commented at 11:38 PM on April 17, 2018:

    In test/functional/README.md it says "Call network_thread_start() after all P2PInterface objects are created ..."

  8. ryanofsky commented at 10:11 PM on April 17, 2018: member

    utACK fadfbd33ab4ea57f1efa2d10a346c25c4ad18b58, looks great! Left some minor comments.

    Note the new testing code was originally part of #12935, but was split out because it's useful on its own.

  9. jamesob approved
  10. jamesob commented at 10:25 PM on April 17, 2018: member
  11. qa: Clarify documentation for send_txs_and_test fa02c5b38b
  12. MarcoFalke commented at 5:41 PM on April 24, 2018: member

    Added a commit to address the documentation nit

  13. laanwj commented at 5:45 PM on April 26, 2018: member

    utACK fa02c5b38b4343e70ddb656c971c9707075f5a8f

  14. laanwj merged this on Apr 26, 2018
  15. laanwj closed this on Apr 26, 2018

  16. laanwj referenced this in commit 8d045a0f66 on Apr 26, 2018
  17. MarcoFalke deleted the branch on Apr 26, 2018
  18. codablock referenced this in commit dd6d632a1f on Sep 30, 2019
  19. codablock referenced this in commit 9bb7f6588a on Sep 30, 2019
  20. codablock referenced this in commit 925f7df261 on Oct 2, 2019
  21. codablock referenced this in commit 03c9a95945 on Oct 2, 2019
  22. UdjinM6 referenced this in commit 5fd1f8ed3f on Oct 3, 2019
  23. codablock referenced this in commit 2d7547c0e2 on Oct 3, 2019
  24. codablock referenced this in commit ed65d51262 on Oct 3, 2019
  25. codablock referenced this in commit a43c4dd9f0 on Jan 5, 2020
  26. codablock referenced this in commit b0aaee03f8 on Jan 5, 2020
  27. codablock referenced this in commit 23bb3f2a0f on Jan 7, 2020
  28. codablock referenced this in commit 87d879d35e on Jan 8, 2020
  29. UdjinM6 referenced this in commit 91b4a38398 on Jan 11, 2020
  30. barrystyle referenced this in commit 82ec47e505 on Jan 22, 2020
  31. ckti referenced this in commit 3170bf03b0 on Mar 28, 2021
  32. gades referenced this in commit 211cda13b3 on Jun 30, 2021
  33. 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-17 06:15 UTC

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