lnwallet: fix lnwallet test compilation on v0.20.x - #11093
Merged
ziggie1984 merged 1 commit intoAug 18, 2026
Merged
Conversation
The regression test added by the backport of lightningnetwork#11035 was taken verbatim from master, where the `OpenChannel` type lives in the `chanstate` package. That package does not exist on this branch, so the `lnwallet` test package failed to compile. Because the missing package is unresolvable in the module graph, this broke far more than `go test ./lnwallet`: the unit test jobs, the linter, `make release` (and therefore cross compilation) and the `Check commits` job all failed for every PR targeting this branch. Use `channeldb.OpenChannel`, which is the type `completeChan` actually carries here.
ziggie1984
force-pushed
the
fix-lnwallet-chanstate-v0.20.x
branch
from
August 17, 2026 23:35
642be04 to
a0c8ef3
Compare
🟢 PR Severity: LOW
🟢 Low (1 files)
AnalysisAlthough To override, add a |
starius
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
lnwallettest package does not compile on this branch, which fails CI for every PR targeting it, regardless of that PR's own contents.Cause
The regression test added by the backport of #11035 was taken verbatim from master, where the
OpenChanneltype lives in thechanstatepackage. That package does not exist on this branch. The cherry-pick applied without a conflict because the commit only adds an import line and a new function — there was nothing textual for git to reconcile — so the breakage landed silently.The same problem exists on
v0.21.x-branch, fixed identically in #11092.Impact
Because the missing package is unresolvable in the module graph, this breaks considerably more than
go test ./lnwallet:FAIL github.com/lightningnetwork/lnd/lnwallet [setup failed]no required module provides package .../chanstatecould not load export data for ".../chanstate"→Makefile:378: lint-source Error 3no required module provides package→Makefile:199: release Error 1make releaseand golangci-lint both resolve test imports, which is why even the build-only jobs fail.Fix
Use
channeldb.OpenChannel— the typecompleteChanactually carries on this branch (lnwallet/wallet.go:337,:366). Two lines; no production code touched.Testing
go vet ./...— clean (previously reported the error above)go build ./...— cleango test ./lnwallet/ -run TestHandleFundingCounterPartySigsMissingReservation— passes, having been uncompilable before