-
Notifications
You must be signed in to change notification settings - Fork 36.2k
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
Fix overflow bug in analyzepsbt fee: CAmount instead of int #15582
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK c9963ae, deserves a test?
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
utACK c9963ae |
1 similar comment
utACK c9963ae |
@sipa Very nice find. Thanks for fixing. How did you find this issue? Did you find this by manual or tool assisted analysis? I had this issue in my back log of conversion warnings to investigate manually but you beat me to it :-)
FWIW, these are all the related
utACK c9963ae |
utACK c9963ae |
… int c9963ae Fix overflow bug in analyzepsbt fee: CAmount instead of int (Pieter Wuille) Pull request description: This causes the `fee` and `estimated_feerate` values in the the analyzepsbt output to be off if the amount being spent exceed 21.47483647 BTC. Tree-SHA512: 61c1e26894617c51cc5fc026a3677a0b759fcbac1e70efa7fdc68d57cfd484525e18c906f1b8c06fd5d846b74a3cb4bc0bbd302a6eeaade79055a47d6d0dacc2
Backported in 232ef63. |
@sipa Are you willing to share how this bug was found? I think it would be valuable to do an informal short "post mortem" of this kind of issues. That would allow us to reason about which mistakes that are recurring and could be candidates for identification by intelligent use of tooling. |
Github-Pull: bitcoin#15582 Rebased-From: c9963ae Tree-SHA512: ed1dcfafb7015de5405112938b04c4009bec3349a8d4e8aca641598ccab31a34c7f16b5045670909fd2e795fc40640a79658ef6b1771e9f21abd0ca759b239b5
This causes the
fee
andestimated_feerate
values in the the analyzepsbt output to be off if the amount being spent exceed 21.47483647 BTC.