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

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

Build:
DEFAULT BRANCH: master
Ran 29 Dec 2023 12:46PM UTC
Files 39
Run time 1s
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

29 Dec 2023 12:39PM UTC coverage: 80.698% (+0.1%) from 80.598%
7356706983.1

push

github

evanlinjin
Merge bitcoindevkit/bdk#1229: Use a universal lookahead value for `KeychainTxOutIndex` and have a reasonable default

1def76f1f chore: make clippy happy and bump clippy msrv (志宇)
c9467dcbb chore: improve documentation of lookahead (LLFourn)
bc796f412 fix(example): bitcoind_rpc_polling now initializes local_chain properly (志宇)
4fd539b64 feat(chain)!: `KeychainTxOutIndex` uses a universal lookahead (Antoine Poinsot)

Pull request description:

  ### Description

  The `bdk::Wallet` is currently created without setting any lookahead value for the keychain. This implicitly makes it a lookahead of 0. As this is a high-level interface we should avoid footguns and aim for a reasonable default.

  To fix this, we have also decided to change `KeychainTxOutIndex` to have a default lookahead. Additionally, we have simplified the `KeychainTxOutIndex` API to have a single `lookahead` that is ONLY set at construction `KeychainTxOutIndex::new(lookahead: u32) -> Self`. This avoids the footguns of having methods which allows the caller to decrease the `lookahead` (which will panic).

  ### Notes to the reviewers

  ~A way to set this value externally is introduced in #1172. This PR only aims to use a saner default than 0. `1_000` is the value used by the Bitcoin Core wallet, and that seems reasonable to me.~

  Edit: we should NOT allow setting the `lookahead` value after-the-fact. Instead, the `lookahead` should be provided to the wallet's constructor.

  @evanlinjin: I don't think additional tests are necessary as no additional features are added, and the surface area of the API is decreased. The original tests already thoroughly test the `lookahead` concept.

  ### Checklists

  #### All Submissions:

  *(This section was updated as this PR changed from being a simple setting to introducing a new method.)*

  * [x] I've signed all my commits
 ... (continued)

8880 of 11004 relevant lines covered (80.7%)

6028.0 hits per line

Source Files on job 7356706983.1
  • Tree
  • List 0
  • Changed 23
  • Source Changed 0
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 7356706983
  • 7eff0242 on github
  • Prev Job for on master (#7326506820.1)
  • Next Job for on master (#7429239538.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