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

bitcoindevkit / bdk / 6046839486
79%

Build:
DEFAULT BRANCH: master
Ran 01 Sep 2023 07:53AM UTC
Jobs 1
Files 40
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

01 Sep 2023 07:48AM UTC coverage: 78.692% (+0.07%) from 78.619%
6046839486

push

github

evanlinjin
Merge bitcoindevkit/bdk#1093: fix: spks_of_all_keychains() shouldn't return an infinite iterator for non-wildcard descriptors

<a class=hub.com/bitcoindevkit/bdk/commit/e48b911c8d23cceab2071cc92085fe6675d55ca9">e48b911c8<a href="https://github.com/bitcoindevkit/bdk/commit/2867e88b64b4a8cf7136cc562ec61c077737a087"> refactor: Make test errors more readable (Daniela Brozzoni)
<a class="double-link" href="https://github.com/bitcoindevkit/bdk/commit/a7a1d9b2fb9fda4d86fe17cf90d9c0d46c4d8609">a7a1d9b2f</a><a href="https://github.com/bitcoindevkit/bdk/commit/2867e88b64b4a8cf7136cc562ec61c077737a087"> fix: non-wildcard descriptors should return an.. ..spk only if index is equal to 0 (Daniela Brozzoni)
</a><a class="double-link" href="https://github.com/bitcoindevkit/bdk/commit/cc1a43c495639f0dbe6da52501cb48f17b8cbbd2">cc1a43c49</a> fix: SpkIterator::new_with_range takes wildcards.. ..into account (Daniela Brozzoni)

Pull request description:

  ### Description

  When you pass a non-wildcard descriptor in `new_with_range`, we make
  sure that the range length is at most 1; if that's not the case, we
  shorten it.
  We would previously use `new_with_range` without this check and with a
  non-wildcard descriptor in `spks_of_all_keychains`, this meant creating
  a spkiterator that would go on producing the same spks over and over
  again, causing some issues with syncing on electrum/esplora.

  To reproduce the bug, run in `example-crates/example_electrum`:
  ```
  cargo run "sh(wsh(or_d(c:pk_k(cPGudvRLDSgeV4hH9NUofLvYxYBSRjju3cpiXmBg9K8G9k1ikCMp),c:pk_k(cSBSBHRrzqSXFmrBhLkZMzQB9q4P9MnAq92v8d9a5UveBc9sLX32))))#zp9pcfs9" scan
  ```

  ### Changelog notice

  - Fixed a bug where `KeychainTxOutIndex::spks_of_all_keychains`/`KeychainTxOutIndex::spks_of_keychain` would return an iterator yielding infinite spks even for non-wildcard descriptors.

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

ACKs for top commit:
  evanlinjin:
    ACK e48b911c8d23cceab2071cc92085fe6675d55ca9

Tree-SHA512: 87627505003696a7db7812fc5b0b523f8cf

52 of 52 new or added lines in 1 file covered. (100.0%)

8040 of 10217 relevant lines covered (78.69%)

425461.31 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6046839486.1 01 Sep 2023 07:53AM UTC 0
78.69
GitHub Action Run
Source Files on build 6046839486
Detailed source file information is not available for this build.
  • Back to Repo
  • 2867e88b on github
  • Prev Build on master (#6042130491)
  • Next Build on master (#6160986176)
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