-
Notifications
You must be signed in to change notification settings - Fork 65
Use FeeRate type in TxDetails fee_rate field #933
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
base: master
Are you sure you want to change the base?
Conversation
54d30ab to
ea491a8
Compare
|
cc @AlexBrou |
|
I’m new to the project and wanted to help test this change locally. I confirmed that TxDetails now uses the FeeRate type instead of an integer, which fixes the rounding issue on the Rust side. |
ItoroD
left a comment
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 0ef0c63
In theory I do like this and wish that rust-bitcoin had more utilities to work with sats/vb, but the design of the type was chosen because they wanted to circumvent dealing with floating-point arithmetic completely (pushing that complexity onto the user instead of within the @ItoroD thanks for the review! Just FYI I think those 3.0 PRs will sit here for a while before we start merging breaking changes on |
Makes sense to keep this aligned with the Rust APIs and avoid floating-point handling. Thanks for the explanation. |
Fixes #932.
The current implementation doesn't allow to calculate more precise versions of the feerate and always gives back the ceiling version of the feerate integer in sat/vb. This lets users do the calculations they need on the type.
It's too bad but this is actually a breaking change, so can only ship with 3.0.
Documentation
bdk_wallethttps://docs.rs/bdk_wallet/2.3.0/bdk_wallet/struct.TxDetails.html
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features: