Skip to content

Fix on-chain amount rounding#24

Open
benthecarman wants to merge 2 commits into
rust-bitcoin:mainfrom
benthecarman:fix-onchain-amount-rounding
Open

Fix on-chain amount rounding#24
benthecarman wants to merge 2 commits into
rust-bitcoin:mainfrom
benthecarman:fix-onchain-amount-rounding

Conversation

@benthecarman

Copy link
Copy Markdown
Contributor

The configurable amount path rounded millisats up to whole sats but then constructed the result as millisats. Fix the bug by building the rounded value as sats so on-chain fixed-amount instructions has the correct amount. Added a test to find regressions.

The configurable amount path rounded millisats up to whole sats but
then constructed the result as millisats. Fix the bug by building the
rounded value as sats so on-chain fixed-amount instructions has the
correct amount. Added a test to find regressions.
@benthecarman benthecarman force-pushed the fix-onchain-amount-rounding branch 12 times, most recently from f4c6e40 to 012322f Compare June 7, 2026 00:30

@TheBlueMatt TheBlueMatt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

oof, thanks.

Comment thread .github/workflows/build.yml Outdated
@benthecarman benthecarman force-pushed the fix-onchain-amount-rounding branch from 012322f to 2b2fb70 Compare June 10, 2026 16:45
@TheBlueMatt

Copy link
Copy Markdown
Member

Can you update the pins for libc?

Later releases of libc, unicode-ident, honggfuzz, and semver raise
their MSRV above this crate's 1.63 MSRV, breaking the MSRV CI job.
Pin them to the last compatible versions, matching the existing
syn/quote/proc-macro2 pins. honggfuzz is also pinned at install time
in ci-fuzz.sh since the version is selected by `cargo install`.
@benthecarman benthecarman force-pushed the fix-onchain-amount-rounding branch from 827888d to f0c2d4b Compare June 29, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants