Skip to content

Conversation

@instagibbs
Copy link
Member

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

Copy link
Member

@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
Member

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
Member

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


# 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
Member

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

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

3 participants