Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed

Conversation

instagibbs
Copy link
Member

No description provided.

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 26, 2024

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

Code Coverage

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

Reviews

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

@DrahtBot DrahtBot added the Tests label Mar 26, 2024
@instagibbs
Copy link
Member Author

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

Copy link
Contributor

@tdb3 tdb3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


result = node.submitpackage([tx_v3_child["hex"], tx_v3_grandchild["hex"]])
assert_equal(result["package_msg"], f"v3-violation, tx {tx_v3_grandchild['txid']} (wtxid={tx_v3_grandchild['wtxid']}) would have too many ancestors")

@cleanup(extra_args=["-acceptnonstdtxn=1"])
def test_v3_ancestors_package_and_mempool(self):
Copy link
Contributor

@tdb3 tdb3 Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
        """

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya know what, it is. Closing this PR.

@instagibbs instagibbs closed this Mar 27, 2024
@glozow
Copy link
Member

glozow commented Mar 27, 2024

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants