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

descriptors: fix unsigned tx max satisfaction weight #1452

Merged

Conversation

jp1ac4
Copy link
Collaborator

@jp1ac4 jp1ac4 commented Nov 8, 2024

This fixes #1406, building on the fix from #1451 for estimating the weight of each input.

An extra 2 is added to the unsigned transaction's weight to account for the Segwit marker and flag.

@darosior
Copy link
Member

darosior commented Nov 8, 2024

Haven't reviewed the test nor the context but the code looks good to me, for what it's worth.

Errors in the weight calculation could be hidden when converting
to vbytes. This separate method will make it easier to spot any
such errors.
@jp1ac4 jp1ac4 force-pushed the desc-fix-unsigned-tx-max-weight branch from 500ae75 to e4ae6dc Compare November 15, 2024 13:45
@jp1ac4
Copy link
Collaborator Author

jp1ac4 commented Nov 15, 2024

Rebased on master.

Copy link
Member

@edouardparis edouardparis left a comment

Choose a reason for hiding this comment

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

utACK e4ae6dc

@edouardparis edouardparis merged commit 1b00cdf into wizardsardine:master Nov 18, 2024
24 checks passed
@jp1ac4 jp1ac4 deleted the desc-fix-unsigned-tx-max-weight branch November 20, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

feerate of unsigned transaction can be overestimated
4 participants