Skip to content

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

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

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

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 14, 2026

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.20.4 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.

Conflict Resolution

The release-notes commit on master writes to
docs/release-notes/release-notes-0.21.3.md, which does not exist on
v0.20.x-branch. The automated cherry-pick therefore created that 0.21.3 file
here instead of conflicting. Resolved by dropping the 0.21.3 file and moving
the two Bug Fixes entries plus the contributor line into
docs/release-notes/release-notes-0.20.4.md, omitting the 0.21-only
deprecation warnings that came along with the file.

The matching entries are added to master's copy of the 0.20.4 notes in #11081.

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)
@github-actions github-actions Bot added this to the v0.21.3 milestone Aug 14, 2026
@github-actions

Copy link
Copy Markdown
Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-11035-to-v0.20.x-branch
git worktree add --checkout .worktree/backport-11035-to-v0.20.x-branch backport-11035-to-v0.20.x-branch
cd .worktree/backport-11035-to-v0.20.x-branch
git reset --hard HEAD^
git cherry-pick -x 081adebca6d2726f232211f437e8e1f8806aeb18
git push --force-with-lease

@ziggie1984
ziggie1984 force-pushed the backport-11035-to-v0.20.x-branch branch from 498f8ce to cefb362 Compare August 14, 2026 19:54
@ziggie1984
ziggie1984 marked this pull request as ready for review August 14, 2026 19:57
@ziggie1984
ziggie1984 force-pushed the backport-11035-to-v0.20.x-branch branch from cefb362 to 178be50 Compare August 14, 2026 20:00

@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 (merge conflict only because of missing 20.4 release notes in the last commit)

@ziggie1984
ziggie1984 merged commit 264217e into v0.20.x-branch Aug 14, 2026
21 of 35 checks 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