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

bitcoindevkit / bdk / 13688082197 / 1
79%
master: 79%

Build:
DEFAULT BRANCH: master
Ran 06 Mar 2025 12:10AM UTC
Files 52
Run time 2s
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

06 Mar 2025 12:06AM UTC coverage: 80.576% (+0.1%) from 80.447%
13688082197.1

push

github

evanlinjin
Merge bitcoindevkit/bdk#1798: Refactor/use iterators to preselect utxos

2f83b4508 test(wallet): check there are no duplicates across required and optional utxos (nymius)
39df2b940 refactor(wallet): remove coin_selection::filter_duplicates (nymius)
79bd7da87 refactor(wallet): use iterators and adaptors in preselect_utxos (nymius)

Pull request description:

  ### Description

  There were multiple calls for de-duplication of selected UTxOs in `Wallet::create_tx`: ([1](https://github.com/bitcoindevkit/bdk/blob/<a class=hub.com/bitcoindevkit/bdk/commit/abc305612160c0e2ce85c7bba4c2c162ff488adc">abc305612/crates/wallet/src/wallet/mod.rs#L2016-L2020)) and ([2](https://github.com/bitcoindevkit/bdk/blob/abc305612160c0e2ce85c7bba4c2c162ff488adc/crates/wallet/src/wallet/mod.rs#L1452)).

  As the test [`test_filter_duplicates`](https://github.com/bitcoindevkit/bdk/blob/master/crates/wallet/src/wallet/coin_selection.rs#L1666-L1695) shows, there are four possible cases for duplication of UTxOs while feeding the coin selection algorithms.

  1. no duplication: out of concern
  2. duplication in the required utxos only: covered by the source of `required_utxos`, `Wallet::list_unspent`, which [roots back the provided `UTxOs` to a `HashMap`](https://github.com/bitcoindevkit/bdk/blob/a5335a184/crates/chain/src/tx_graph.rs#L911-L912) which should avoid any duplication by definition
  3. duplication in the optional utxos only: is the only one possible as optional `UTxOs` are stored in a `Vec` and no checks are performed about the duplicity of their members.
  4. duplication across the required and optional utxos: is already covered by `Wallet::preselect_utxos`, which avoid the processing of required UTxOs while listing the unspent available UTxOs in the wallet.

  This refactor does the following:
  - Refactors `TxParams::utxos` type to be `HashSet<LocalOutput>` avoiding the duplication case 3
  - Ke... (continued)

12076 of 14987 relevant lines covered (80.58%)

14277.08 hits per line

Source Files on job 13688082197.1
  • Tree
  • List 52
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 13688082197
  • 1975835f on github
  • Prev Job for on master (#13687812686.1)
  • Next Job for on master (#13688754412.1)
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