Skip to content

Conversation

@thunderbiscuit
Copy link
Member

@thunderbiscuit thunderbiscuit commented Jan 8, 2026

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

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing
  • I've added a changelog in the next release tracking issue (see example)
  • I've linked the relevant upstream docs or specs above

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

@thunderbiscuit
Copy link
Member Author

cc @AlexBrou

@busayo-OD
Copy link

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.
For UniFFI consumers (Kotlin/Swift), I noticed that FeeRate currently exposes only integer-based accessors (e.g. to_sat_per_kwu() returning sat/kwu).
Do you expect consumers to perform the sat/kwu → sat/vB conversion themselves, or would it make sense to expose a helper that returns sat/vB as a float to make fractional fee rates directly accessible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Return FeeRate type in TxDetail instead of FeeRate::to_sat_per_vb_ceil() (f32)

2 participants