What changed, and why it matters
This is a small internal code cleanup change. It swaps a concrete database type for a narrower interface in a component that sends out channel event notifications. There is no visible security fix, behavior change, or bug being patched.
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 ChannelNotifier to depend on the chanstate.Store interface instead of the concrete channeldb.ChannelStateDB. The constructor signature changes from New(channeldb.ChannelStateDB) to New(chanstate.Store). The notifier’s actual usage of the store—fetching open and closed channel records for event payloads—is unchanged. This is an interface-segregation / dependency-inversion refactor with no functional or security change evident in the diff.
Changed components
channelnotifier/channelnotifier.goInspect captured patch +3 / −2
diff --git a/channelnotifier/channelnotifier.go b/channelnotifier/channelnotifier.go
index e7b815b..06f3e67 100644
--- a/channelnotifier/channelnotifier.go
+++ b/channelnotifier/channelnotifier.go
@@ -5,6 +5,7 @@ import (
"github.com/btcsuite/btcd/wire"
"github.com/lightningnetwork/lnd/channeldb"
+ "github.com/lightningnetwork/lnd/chanstate"
"github.com/lightningnetwork/lnd/subscribe"
)
@@ -17,7 +18,7 @@ type ChannelNotifier struct {
ntfnServer *subscribe.Server
- chanDB *channeldb.ChannelStateDB
+ chanDB chanstate.Store
}
// PendingOpenChannelEvent represents a new event where a new channel has
@@ -97,7 +98,7 @@ type FundingTimeoutEvent struct {
// New creates a new channel notifier. The ChannelNotifier gets channel
// events from peers and from the chain arbitrator, and dispatches them to
// its clients.
-func New(chanDB *channeldb.ChannelStateDB) *ChannelNotifier {
+func New(chanDB chanstate.Store) *ChannelNotifier {
return &ChannelNotifier{
ntfnServer: subscribe.NewServer(),
chanDB: chanDB,
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.