Skip to content

Fix stop-gap recovery test assumptions - #1154

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
tnull:2026-10-fix-full-scan-stop-gap
Oct 15, 2026
Merged

tnull merged 1 commit into
lightningdevkit:mainfrom
tnull:2026-10-fix-full-scan-stop-gap

Conversation

@tnull

@tnull tnull commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Recent BDK clients count the full-scan stop gap only after the wallet's revealed range. The recovery test funded an address within that range plus the default gap, so its zero-balance assertion failed.

Place the funds beyond the startup address pool and default gap, allowing for batched requests. Keep the configured gap wide enough for older clients too, preserving both recovery assertions.

Co-Authored-By: HAL 9000

@tnull
tnull requested a review from joostjager October 12, 2026 10:52
@ldk-reviews-bot

ldk-reviews-bot commented Oct 12, 2026 •

Copy link
Copy Markdown

👋 Thanks for assigning @joostjager as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tnull
tnull requested review from jkczyz and removed request for joostjager October 12, 2026 10:52
@tnull
tnull requested a review from joostjager October 14, 2026 11:44
Comment thread tests/integration_tests_rust.rs Outdated
@tnull
tnull requested a review from joostjager October 14, 2026 13:58
joostjager
joostjager previously approved these changes Oct 14, 2026

@joostjager joostjager left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to unblock CI, but still curious about the +5

Recent BDK clients count the full-scan stop gap only after the
wallet's revealed range. The recovery test funded an address within
that range plus the default gap, so its zero-balance assertion failed.

Place the funds beyond the startup address pool and default gap,
allowing for batched requests. Keep the configured gap wide enough
for older clients too, preserving both recovery assertions.

Co-Authored-By: HAL 9000
@tnull
tnull force-pushed the 2026-10-fix-full-scan-stop-gap branch from bff8753 to 2f82cf9 Compare October 15, 2026 07:55
@tnull
tnull requested a review from joostjager October 15, 2026 07:55

@joostjager joostjager left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Also cover older BDK clients, which count revealed-but-unused scripts toward the gap.

feels a bit strange now because no exception is made in the code line below.

But it's good enough as is I think

@tnull
tnull merged commit 9d38271 into lightningdevkit:main Oct 15, 2026
17 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants