What changed, and why it matters
This commit is a straightforward internal code cleanup in LND. It changes three places in server.go to use a new internal type name (chanstate.OpenChannel) instead of an old alias (channeldb.OpenChannel). The actual behavior of the code is unchanged; it simply updates wiring after a previous refactoring in the funding package. There is no security-relevant change visible in the diff.
No security action needed. Treat as a normal refactoring/rename follow-up and review in the context of the broader funding package migration if desired.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch updates type references in server.go from channeldb.OpenChannel to chanstate.OpenChannel in three function signatures: the WatchNewChannel callback passed to the funding manager, the findChannel helper, and notifyPendingOpenChannelPeerEvent. The commit message explicitly states this is a follow-up to the funding package change that removes a consumer-facing dependency on the channeldb OpenChannel alias. No logic, validation, or control-flow changes are present.
Changed components
server.gofunding manager callback wiringInspect captured patch +3 / −3
diff --git a/server.go b/server.go
index bb6743e..a0312bb 100644
--- a/server.go
+++ b/server.go
@@ -1661,7 +1661,7 @@ func newServer(ctx context.Context, cfg *Config, listenAddrs []net.Addr,
}
return delay
},
- WatchNewChannel: func(channel *channeldb.OpenChannel,
+ WatchNewChannel: func(channel *chanstate.OpenChannel,
peerKey *btcec.PublicKey) error {
// First, we'll mark this new peer as a persistent peer
@@ -3509,7 +3509,7 @@ func (s *server) createNewHiddenService(ctx context.Context) error {
// optimization that is quicker than seeking for a channel given only the
// ChannelID.
func (s *server) findChannel(node *btcec.PublicKey, chanID lnwire.ChannelID) (
- *channeldb.OpenChannel, error) {
+ *chanstate.OpenChannel, error) {
nodeChans, err := s.chanStateDB.FetchOpenChannels(node)
if err != nil {
@@ -4435,7 +4435,7 @@ func (s *server) notifyOpenChannelPeerEvent(op wire.OutPoint,
// notifyPendingOpenChannelPeerEvent updates the access manager's maps and then
// calls the channelNotifier's NotifyPendingOpenChannelEvent.
func (s *server) notifyPendingOpenChannelPeerEvent(op wire.OutPoint,
- pendingChan *channeldb.OpenChannel, remotePub *btcec.PublicKey) {
+ pendingChan *chanstate.OpenChannel, remotePub *btcec.PublicKey) {
// Call newPendingOpenChan to update the access manager's maps for this
// peer.
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.