|
Ran
|
Jobs
1
|
Files
39
|
Run time
4s
|
Badge
README BADGES
|
push
github
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
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 7356706983.1 | 0 |
80.7 |
GitHub Action Run |