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

bitcoindevkit / bdk / 7356706983
79%

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

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

Jobs
ID Job ID Ran Files Coverage
1 7356706983.1 29 Dec 2023 12:46PM UTC 0
80.7
GitHub Action Run
Source Files on build 7356706983
Detailed source file information is not available for this build.
  • Back to Repo
  • 7eff0242 on github
  • Prev Build on master (#7326506820)
  • Next Build on master (#7429239538)
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