test: add V3 test case for inpool->inpackage->inpackage #29743

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:2024-03-v3-mixed-linear-case changing 1 files +10 −0
  1. instagibbs commented at 9:38 PM on March 26, 2024: member

    No description provided.

  2. test: add V3 test case for inpool->inpackage->inpackage ceb0a4afd9
  3. DrahtBot commented at 9:38 PM on March 26, 2024: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. DrahtBot added the label Tests on Mar 26, 2024
  5. instagibbs commented at 9:38 PM on March 26, 2024: member

    @glozow current coverage seems to cover inpackage->inpackage->inpackage, so this might be useful

  6. in test/functional/mempool_accept_v3.py:276 in ceb0a4afd9
     271 | +
     272 | +        result = node.submitpackage([tx_v3_child["hex"], tx_v3_grandchild["hex"]])
     273 | +        assert_equal(result["package_msg"], f"v3-violation, tx {tx_v3_grandchild['txid']} (wtxid={tx_v3_grandchild['wtxid']}) would have too many ancestors")
     274 | +
     275 |      @cleanup(extra_args=["-acceptnonstdtxn=1"])
     276 |      def test_v3_ancestors_package_and_mempool(self):
    


    tdb3 commented at 1:46 AM on March 27, 2024:

    Is this scenario (parent is in mempool, child->grandchild package is submitted and is rejected) at least in part already covered in the test_v3_ancestors_package_and_mempool() test function? Maybe I'm overlooking something?

        def test_v3_ancestors_package_and_mempool(self):
            """
            A v3 transaction in a package cannot have 2 v3 parents.
            Test that if we have a transaction graph A -> B -> C, where A, B, C are
            all v3 transactions, that we cannot use submitpackage to get the
            transactions all into the mempool.
    
            Verify, in particular, that if A is already in the mempool, then
            submitpackage(B, C) will fail.
            """
    

    instagibbs commented at 3:31 AM on March 27, 2024:

    ya know what, it is. Closing this PR.

  7. tdb3 commented at 1:47 AM on March 27, 2024: contributor

    Always good to find new test coverage opportunities.
    Pulled and ran functional test. Passed. Inline comment left.

  8. instagibbs closed this on Mar 27, 2024

  9. glozow commented at 9:56 AM on March 27, 2024: member

    Agree this case is already covered. Though from offline conversation it sounds like you're hitting some interesting things when it's a package RBF, so will keep this case in mind. Thanks as well @tdb3 :)

  10. bitcoin locked this on Mar 27, 2025

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-27 03:13 UTC

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