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

Expand on contracting carve-out rule test #18723

Closed
wants to merge 1 commit into from

Conversation

instagibbs
Copy link
Member

Testing the "one more" on top of "one more", making sure this is rejected.

Copy link
Contributor

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

ACK c5db55a modulo comments (feel free to ignore the nits)

for _ in range(4):
# First tx has 3 outputs
(txid, sent_value) = self.chain_transaction(self.nodes[0], [txid], [vout], value, fee, 3)
vout = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

afaict vout is always zero anyway? same for line 63 below...

Copy link
Member Author

Choose a reason for hiding this comment

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

removed for line 63, otherwise I think this is more clear personally

# First tx has 3 outputs
(txid, sent_value) = self.chain_transaction(self.nodes[0], [txid], [vout], value, fee, 3)
vout = 0
value = sent_value
Copy link
Contributor

Choose a reason for hiding this comment

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

redundant assignment in this loop (and the next one), can remove?

if not, may make sense to extract the loop body to a function

test/functional/mempool_package_onemore.py Show resolved Hide resolved
@@ -79,6 +86,10 @@ def run_test(self):
# and the second chain should work just fine
self.chain_transaction(self.nodes[0], [second_chain], [0], second_chain_value, fee, 1)

# But now that we're at the additional carve-out limit, the third base output being spent will be rejected
# For both ancestor's descendant limits
assert_raises_rpc_error(-26, "too-long-mempool-chain, too many descendants", self.chain_transaction, self.nodes[0], [chain[0][0]], [2], chain[0][1], fee, 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

"too-long-mempool-chain, too many descendants" used 5x, could hoist to a TOO_MANY_DESCENDANTS constant

Copy link
Member Author

Choose a reason for hiding this comment

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

done

test/functional/mempool_package_onemore.py Show resolved Hide resolved
@instagibbs instagibbs closed this Oct 26, 2020
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants