]> Untitled Git - bdk/commit
Merge bitcoindevkit/bdk#678: Implement conversion for Lightning fee rate
authorDaniela Brozzoni <danielabrozzoni@protonmail.com>
Mon, 29 Aug 2022 07:59:25 +0000 (09:59 +0200)
committerDaniela Brozzoni <danielabrozzoni@protonmail.com>
Mon, 29 Aug 2022 08:02:31 +0000 (10:02 +0200)
commit12507c707f27f79e7be683701e1e385a1e5bb944
treed1a6681af66da9e0187a30efe902b1f2efcb40da
parent0a3734ed2b9aeebdc7f13e64c6544d35788a0699
parentde358f8cdc97bf685ba46cf6751443d007b9f58e
Merge bitcoindevkit/bdk#678: Implement conversion for Lightning fee rate

de358f8cdc97bf685ba46cf6751443d007b9f58e Implement conversion for Lightning fee rate (Vladimir Fomene)

Pull request description:

  This PR fixes #608.

  ### Description

  Lightning denotes transaction fee rate sats / 1000 weight units and sats / 1000 vbytes.
  Here we add support for creating BDK FeeRate from lightning fee rate. We also move all FeeRate tests to
  types.rs and rename as_sat_vb to as_sat_per_vb.

  ### Notes to the reviewers

  Matt was concerned that we might round down value in fee calculation in such a way that a transaction may not be relayed because it is below Bitcoin Core's min relay fee (1 sat/vbyte). I don't think we need to worry about that because we [round up(ceil)](https://github.com/bitcoindevkit/bdk/blob/master/src/types.rs#L91) during fee calculation, we don't round down. I will love to hear what you think. Is there something I'm missing? @johncantrell97, I will appreciate your review on this one.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### New Features:

  * [x] I've added tests for the new feature
  * [x] I've added docs for the new feature
  * [x] I've updated `CHANGELOG.md`

  #### Bugfixes:

  * [ ] This pull request breaks the existing API
  * [ ] I've added tests to reproduce the issue which are now passing
  * [x] I'm linking the issue being fixed by this PR

ACKs for top commit:
  danielabrozzoni:
    ACK de358f8cdc97bf685ba46cf6751443d007b9f58e

Tree-SHA512: aaa7da8284b668d15ad9c92168c149c4b3ee0f8faee9b7eb159745d23e38835189eaf5c336da14ba9272ee07cd366718eefb8365da9ddf53014e122b6393a087