What changed, and why it matters
This is a small internal code cleanup in LND's funding manager. It replaces a direct dependency on a specific database type with a narrower interface (chanstate.Store). There is no functional change visible in the diff, no bug fix, and no security-relevant behavior change.
No security action needed. Review as normal refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit changes the funding manager’s Config.ChannelDB field from a concrete *channeldb.ChannelStateDB pointer to the chanstate.Store interface. The comment is updated accordingly. Only the type declaration changes; no call sites, logic, or data handling are modified in the visible diff. This is a dependency-inversion/refactoring change.
Changed components
funding/manager.goInspect captured patch +4 / −2
diff --git a/funding/manager.go b/funding/manager.go
index 417ad9c..8d51174 100644
--- a/funding/manager.go
+++ b/funding/manager.go
@@ -23,6 +23,7 @@ import (
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/chanacceptor"
"github.com/lightningnetwork/lnd/channeldb"
+ "github.com/lightningnetwork/lnd/chanstate"
"github.com/lightningnetwork/lnd/discovery"
"github.com/lightningnetwork/lnd/fn/v2"
"github.com/lightningnetwork/lnd/graph"
@@ -384,8 +385,9 @@ type Config struct {
// so that the channel creation process can be completed.
Notifier chainntnfs.ChainNotifier
- // ChannelDB is the database that keeps track of all channel state.
- ChannelDB *channeldb.ChannelStateDB
+ // ChannelDB is the database that keeps track of channel state used by
+ // the funding flow.
+ ChannelDB chanstate.Store
// SignMessage signs an arbitrary message with a given public key. The
// actual digest signed is the double sha-256 of the message. In the
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.