Skip to content

Use bitcoin::Amount and bitcoin::FeeRate#198

Merged
luisschwab merged 2 commits into
bitcoindevkit:masterfrom
luisschwab:refactor/feerate
May 2, 2026
Merged

Use bitcoin::Amount and bitcoin::FeeRate#198
luisschwab merged 2 commits into
bitcoindevkit:masterfrom
luisschwab:refactor/feerate

Conversation

@luisschwab
Copy link
Copy Markdown
Member

Closes #192

Changelog

## Added
- Add `deserialize_fee_histogram`

## Breaking 
- Use `Amount` and `FeeRate` on `MempoolStats.fee_histogram`
- `submit_package` takes in `FeeRate` for `maxfeerate` instead of `f64`
- `submit_package` takes in `Amount` for `maxburnamount` instead of `f64`
- `get_fee_estimates` returns `FeeRate` instead of `f64`

## Changed
- Update `test_feerate_parsing` with an up to date fee histogram

@luisschwab luisschwab self-assigned this May 1, 2026
@luisschwab luisschwab requested a review from oleonardolima as a code owner May 1, 2026 16:02
@luisschwab luisschwab added the api A breaking API change label May 1, 2026
Copy link
Copy Markdown
Collaborator

@oleonardolima oleonardolima left a comment

Choose a reason for hiding this comment

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

tACK 291aa09

I think one point of attention would be that currently the FeeRate in get_mempool_stats is being floored (e.g [5.0072994, 50347] -> (FeeRate(1251), Weight(50347))).

@luisschwab luisschwab merged commit 42627b9 into bitcoindevkit:master May 2, 2026
26 checks passed
@luisschwab luisschwab deleted the refactor/feerate branch May 2, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api A breaking API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use FeeRate for all fee fields

2 participants