Commit bc347e8
committed
Add
Expose the ldk-node wallet-recovery API through a new top-level CLI
flag (also overridable via the `LDK_SERVER_RESCAN_FROM_HEIGHT`
environment variable). When set on a fresh node's first startup, the
value is passed through to
`Builder::set_wallet_recovery_mode(Some(RecoveryMode { rescan_from_height: Some(h) }))`
so the wallet picks up funds sent before the current chain tip.
Bitcoin Core RPC/REST chain sources honor the height precisely by
resolving the block hash at `h` and using it as the wallet birthday.
Esplora/Electrum backends cannot resolve a block hash from a height
via the BDK client APIs, so they ignore the value but still escalate
the next sync to a one-shot `full_scan` to re-discover funds on
previously-unknown addresses.
The `ldk-node` dependency is temporarily pointed at the local
`2026-04-abort-on-first-startup-tip-fetch-failure` worktree since the
`RecoveryMode` API is not yet on ldk-node's upstream main; the
Cargo.toml entry should be restored to a pinned upstream git rev once
that branch merges.
Co-Authored-By: HAL 9000--rescan-from-height CLI argument1 parent 570ed52 commit bc347e8
4 files changed
Lines changed: 43 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
197 | 208 | | |
198 | 209 | | |
199 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
705 | 712 | | |
706 | 713 | | |
707 | 714 | | |
| |||
0 commit comments