• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bitcoindevkit / bdk / 12285126295
78%

Build:
DEFAULT BRANCH: master
Ran 11 Dec 2024 09:26PM UTC
Jobs 1
Files 51
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Dec 2024 09:22PM UTC coverage: 83.848% (+0.09%) from 83.763%
12285126295

push

github

notmandatory
Merge bitcoindevkit/bdk#1763: Change coin_selection and DescriptorExt::dust_value to use Amount type

2a9eeed30 ci: pin msrv dep version for rustls (Steve Myers)
20789ec9e refactor(chain)!: use Amount for DescriptorExt::dust_value() (Steve Myers)
58a843575 refactor(coin_selection)!: use Amount and SignedAmount for API and internally (Steve Myers)

Pull request description:

  ### Description

  refactor(coin_selection)!: use Amount and SignedAmount for API and internally
  refactor(chain)!: use Amount for DescriptorExt::dust_value()

  Using named types make the API and internal code easier to read and reason about since it makes it clear that the values are bitcoin amounts. Also to create these types the units (ie .from_sat()) must be specified.

  ### Notes to the reviewers

  For coin_selection using Amount and SignedAmount makes internal code safer against overflow errors. In particular because these types will panic if an amount overflow occurs. Using u64/i64 on the other hand can silently rollover. See: https://doc.rust-lang.org/book/ch03-02-data-types.html#integer-overflow

  This is a continuation of the work done in #1595.  Since this is an API breaking change I would like to include it in the 1.0.0-beta milestone if possible.

  ### Changelog notice

  - Change coin_selection to use Amount instead of u64 for all bitcoin amounts.
  - Change DescriptorExt::dust_value() to return an Amount instead of u64.

  ### 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

  #### Bugfixes:

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

ACKs f... (continued)

187 of 192 new or added lines in 3 files covered. (97.4%)

11976 of 14283 relevant lines covered (83.85%)

21249.73 hits per line

Jobs
ID Job ID Ran Files Coverage
1 12285126295.1 11 Dec 2024 09:26PM UTC 0
83.85
GitHub Action Run
Source Files on build 12285126295
Detailed source file information is not available for this build.
  • Back to Repo
  • 49d64771 on github
  • Prev Build on master (#12270472655)
  • Next Build on master (#12288529049)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc