Skip to content

[v0.21.x-branch] Backport #11035: lnwallet+lnwire: handle boundary cases - #11077

Merged
ziggie1984 merged 3 commits into
v0.21.x-branchfrom
backport-11035-to-v0.21.x-branch
Aug 14, 2026
Merged

[v0.21.x-branch] Backport #11035: lnwallet+lnwire: handle boundary cases#11077
ziggie1984 merged 3 commits into
v0.21.x-branchfrom
backport-11035-to-v0.21.x-branch

Conversation

@github-actions

Copy link
Copy Markdown

Backport of #11035


Summary

  • Complete missing wallet reservation responses.
  • Defensively handle zero-block channel ranges and avoid zero-block reply
    prefixes.
  • Add focused regressions and a v0.21.3 release note.

Change Description

The wallet funding handler now returns both completion results when a pending
reservation is absent. Channel-range helpers retain their first height for
zero-block input, and the graph syncer skips a nonexistent prefix when the
first queried block exceeds one reply chunk.

Verified with:

  • go test ./lnwallet ./lnwire ./discovery -count=1
  • go test -race ./lnwallet -run '^TestHandleFundingCounterPartySigsMissingReservation -count=1
  • go test -race ./discovery -run '^(TestGossipSyncerReplyChanRangeQueryBlockRange|TestGossipSyncerReplyChanRangeQueryDenseFirstBlock) -count=1

Return both completion results when the reservation is no longer
present.

Add a focused regression test for the missing-reservation response.

(cherry picked from commit 8bf173e)
Clamp zero-block range boundaries without treating them as valid
empty ranges. Avoid emitting a zero-block prefix when the first queried
block exceeds the reply chunk size, and cover both discovery paths.

(cherry picked from commit b423c8b)
Document the channel funding and channel range boundary fixes for the
v0.21.3 maintenance release.

(cherry picked from commit 081adeb)

@ziggie1984 ziggie1984 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ziggie1984
ziggie1984 merged commit 73cdb19 into v0.21.x-branch Aug 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants