What changed, and why it matters
This is a small internal code cleanup in LND's wallet RPC server. It changes one helper function to use a newer internal package type (chanstate.OpenChannel) instead of an older compatibility alias (channeldb.OpenChannel). There is no user-facing behavior change, no bug fix, and no security-relevant change visible in the diff.
No security action needed. Treat as routine refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit refactors getWaitingCloseChannel in lnrpc/walletrpc/walletkit_server.go to return chanstate.OpenChannel instead of channeldb.OpenChannel, and updates the fn.Find callback type accordingly. The chanstate package is imported. The commit message describes this as moving the waiting-close channel helper to chanstate.OpenChannel because the helper consumes channel state returned by the store interface. No logic, control flow, validation, or API surface changes are present.
Changed components
lnrpc/walletrpc/walletkit_server.goInspect captured patch +3 / −2
diff --git a/lnrpc/walletrpc/walletkit_server.go b/lnrpc/walletrpc/walletkit_server.go
index 456fb20..8480f62 100644
--- a/lnrpc/walletrpc/walletkit_server.go
+++ b/lnrpc/walletrpc/walletkit_server.go
@@ -33,6 +33,7 @@ import (
"github.com/btcsuite/btcwallet/wtxmgr"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/lightningnetwork/lnd/channeldb"
+ "github.com/lightningnetwork/lnd/chanstate"
"github.com/lightningnetwork/lnd/contractcourt"
"github.com/lightningnetwork/lnd/fn/v2"
"github.com/lightningnetwork/lnd/input"
@@ -1270,7 +1271,7 @@ func (w *WalletKit) BumpFee(ctx context.Context,
// getWaitingCloseChannel returns the waiting close channel in case it does
// exist in the underlying channel state database.
func (w *WalletKit) getWaitingCloseChannel(
- chanPoint wire.OutPoint) (*channeldb.OpenChannel, error) {
+ chanPoint wire.OutPoint) (*chanstate.OpenChannel, error) {
// Fetch all channels, which still have their commitment transaction not
// confirmed (waiting close channels).
@@ -1279,7 +1280,7 @@ func (w *WalletKit) getWaitingCloseChannel(
return nil, err
}
- channel := fn.Find(chans, func(c *channeldb.OpenChannel) bool {
+ channel := fn.Find(chans, func(c *chanstate.OpenChannel) bool {
return c.FundingOutpoint == chanPoint
})
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.