What changed, and why it matters
This commit is a routine internal code cleanup in the LND Lightning node software. It removes temporary generic type parameters from channel-state database interfaces and replaces them with direct references to the concrete OpenChannel type. There are no user-facing behavior changes, no bug fixes, and no security-related modifications.
No security action required. Treat as normal refactoring/technical-debt cleanup during code review.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change refactors Go interfaces in the chanstate package from generic types (Store[Channel any], OpenChannelStore[Channel any], etc.) to concrete non-generic interfaces using *OpenChannel directly. Call sites across channeldb, channelnotifier, chanrestore, contractcourt, funding, htlcswitch, lnrpc/invoicesrpc, lnrpc/walletrpc, peer, server, and subrpcserver_config are updated to use the new concrete types. Several now-unused channeldb imports are removed. A stale nolint:unused comment on the logger is also removed. The diff is purely structural/type-level with no runtime logic changes.
Changed components
chanstate package interfaceschanneldb compile-time assertionschannelnotifierchanrestorecontractcourt/breach_arbitratorfunding/managerhtlcswitch/link_testlnrpc/invoicesrpc/addinvoicelnrpc/invoicesrpc/config_activelnrpc/walletrpc/config_activepeer/brontideserver.gosubrpcserver_config.goInspect captured patch +88 / −89
diff --git a/channeldb/chanstate_assertions.go b/channeldb/chanstate_assertions.go
index 0398e62..3f29d76 100644
--- a/channeldb/chanstate_assertions.go
+++ b/channeldb/chanstate_assertions.go
@@ -4,4 +4,4 @@ import "github.com/lightningnetwork/lnd/chanstate"
// Compile-time assertions that ChannelStateDB satisfies the channel-state
// store contracts while the KV implementation still lives in channeldb.
-var _ chanstate.Store[*OpenChannel] = (*ChannelStateDB)(nil)
+var _ chanstate.Store = (*ChannelStateDB)(nil)
diff --git a/channelnotifier/channelnotifier.go b/channelnotifier/channelnotifier.go
index fdfadc0..7332421 100644
--- a/channelnotifier/channelnotifier.go
+++ b/channelnotifier/channelnotifier.go
@@ -18,7 +18,7 @@ type ChannelNotifier struct {
ntfnServer *subscribe.Server
- chanDB chanstate.Store[*channeldb.OpenChannel]
+ chanDB chanstate.Store
}
// PendingOpenChannelEvent represents a new event where a new channel has
@@ -98,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 chanstate.Store[*channeldb.OpenChannel]) *ChannelNotifier {
+func New(chanDB chanstate.Store) *ChannelNotifier {
return &ChannelNotifier{
ntfnServer: subscribe.NewServer(),
chanDB: chanDB,
diff --git a/chanrestore.go b/chanrestore.go
index e8da9c9..d97e50f 100644
--- a/chanrestore.go
+++ b/chanrestore.go
@@ -36,7 +36,7 @@ const (
// need the secret key chain in order obtain the prior shachain root so we can
// verify the DLP protocol as initiated by the remote node.
type chanDBRestorer struct {
- db chanstate.OpenChannelStore[*channeldb.OpenChannel]
+ db chanstate.OpenChannelStore
secretKeys keychain.SecretKeyRing
diff --git a/chanstate/interface.go b/chanstate/interface.go
index 397a05f..cce8158 100644
--- a/chanstate/interface.go
+++ b/chanstate/interface.go
@@ -21,38 +21,38 @@ import (
// concrete channeldb.ChannelStateDB type during the migration. Once the channel
// state implementation moves into this package and the old concrete type is no
// longer part of consumer-facing code, this name can be revisited.
-type Store[Channel any] interface {
+type Store interface { //nolint:interfacebloat
// OpenChannelStore owns open-channel records.
- OpenChannelStore[Channel]
+ OpenChannelStore
// HistoricalChannelStore owns the post-close historical channel view.
- HistoricalChannelStore[Channel]
+ HistoricalChannelStore
// OpenChannelLifecycleStore owns persisted lifecycle state for open
// channel records.
- OpenChannelLifecycleStore[Channel]
+ OpenChannelLifecycleStore
// OpenChannelStatusStore owns persisted status flags for open channel
// records.
- OpenChannelStatusStore[Channel]
+ OpenChannelStatusStore
// OpenChannelShutdownStore owns persisted shutdown state.
- OpenChannelShutdownStore[Channel]
+ OpenChannelShutdownStore
// OpenChannelCloseTxStore owns persisted closing transaction state.
- OpenChannelCloseTxStore[Channel]
+ OpenChannelCloseTxStore
// OpenChannelCommitmentStore owns persisted commitment state for open
// channel records.
- OpenChannelCommitmentStore[Channel]
+ OpenChannelCommitmentStore
// OpenChannelFwdPkgStore owns forwarding packages tied to open
// channel records.
- OpenChannelFwdPkgStore[Channel]
+ OpenChannelFwdPkgStore
// ClosedChannelStore owns closed-channel summaries and lifecycle
// mutations.
- ClosedChannelStore[Channel]
+ ClosedChannelStore
// FinalHTLCStore owns final HTLC outcome data.
FinalHTLCStore
@@ -67,46 +67,46 @@ type Store[Channel any] interface {
}
// OpenChannelStore owns open-channel records.
-type OpenChannelStore[Channel any] interface {
+type OpenChannelStore interface {
// FetchOpenChannels starts a new database transaction and returns
// all stored currently active/open channels associated with the
// target nodeID. In the case that no active channels are known to
// have been created with this node, then a zero-length slice is
// returned.
- FetchOpenChannels(nodeID *btcec.PublicKey) ([]Channel, error)
+ FetchOpenChannels(nodeID *btcec.PublicKey) ([]*OpenChannel, error)
// FetchChannel attempts to locate a channel specified by the passed
// channel point. If the channel cannot be found, then an error will
// be returned.
- FetchChannel(chanPoint wire.OutPoint) (Channel, error)
+ FetchChannel(chanPoint wire.OutPoint) (*OpenChannel, error)
// FetchChannelByID attempts to locate a channel specified by the
// passed channel ID. If the channel cannot be found, then an error
// will be returned.
- FetchChannelByID(id lnwire.ChannelID) (Channel, error)
+ FetchChannelByID(id lnwire.ChannelID) (*OpenChannel, error)
// FetchAllChannels attempts to retrieve all open channels currently
// stored within the database, including pending open, fully open and
// channels waiting for a closing transaction to confirm.
- FetchAllChannels() ([]Channel, error)
+ FetchAllChannels() ([]*OpenChannel, error)
// FetchAllOpenChannels will return all channels that have the
// funding transaction confirmed, and is not waiting for a closing
// transaction to be confirmed.
- FetchAllOpenChannels() ([]Channel, error)
+ FetchAllOpenChannels() ([]*OpenChannel, error)
// FetchPendingChannels will return channels that have completed the
// process of generating and broadcasting funding transactions, but
// whose funding transactions have yet to be confirmed on the
// blockchain.
- FetchPendingChannels() ([]Channel, error)
+ FetchPendingChannels() ([]*OpenChannel, error)
// FetchWaitingCloseChannels will return all channels that have been
// opened, but are now waiting for a closing transaction to be
// confirmed.
//
// NOTE: This includes channels that are also pending to be opened.
- FetchWaitingCloseChannels() ([]Channel, error)
+ FetchWaitingCloseChannels() ([]*OpenChannel, error)
// FetchPermAndTempPeers returns a map where the key is the remote
// node's public key and the value is a struct that has a tally of
@@ -124,200 +124,205 @@ type OpenChannelStore[Channel any] interface {
}
// HistoricalChannelStore owns the post-close historical channel view.
-type HistoricalChannelStore[Channel any] interface {
+type HistoricalChannelStore interface {
// FetchHistoricalChannel fetches open channel data from the
// historical channel bucket.
- FetchHistoricalChannel(outPoint *wire.OutPoint) (Channel, error)
+ FetchHistoricalChannel(outPoint *wire.OutPoint) (*OpenChannel, error)
}
// OpenChannelLifecycleStore owns persisted lifecycle state for open channel
// records.
-type OpenChannelLifecycleStore[Channel any] interface {
+type OpenChannelLifecycleStore interface {
// SyncPendingChannel writes a pending channel to the store and records
// the funding broadcast height.
- SyncPendingChannel(channel Channel, addr net.Addr,
+ SyncPendingChannel(channel *OpenChannel, addr net.Addr,
pendingHeight uint32) error
// RefreshChannel updates the in-memory channel state using the latest
// state observed on disk.
- RefreshChannel(channel Channel) error
+ RefreshChannel(channel *OpenChannel) error
// MarkChannelConfirmationHeight updates the channel's confirmation
// height once the channel opening transaction receives one
// confirmation.
- MarkChannelConfirmationHeight(channel Channel, height uint32) error
+ MarkChannelConfirmationHeight(channel *OpenChannel, height uint32) error
// MarkChannelCloseConfirmationHeight updates the channel's close
// confirmation height when the closing transaction is first detected
// in a block.
- MarkChannelCloseConfirmationHeight(channel Channel,
+ MarkChannelCloseConfirmationHeight(channel *OpenChannel,
height fn.Option[uint32]) error
// MarkChannelOpen marks a channel as fully open given a locator that
// uniquely describes its location within the chain.
- MarkChannelOpen(channel Channel, openLoc lnwire.ShortChannelID) error
+ MarkChannelOpen(channel *OpenChannel,
+ openLoc lnwire.ShortChannelID) error
// MarkChannelRealScid marks the zero-conf channel's confirmed
// ShortChannelID.
- MarkChannelRealScid(channel Channel,
+ MarkChannelRealScid(channel *OpenChannel,
realScid lnwire.ShortChannelID) error
// MarkChannelScidAliasNegotiated marks that the scid-alias feature
// bit was negotiated during the lifetime of the channel.
- MarkChannelScidAliasNegotiated(channel Channel) error
+ MarkChannelScidAliasNegotiated(channel *OpenChannel) error
}
// OpenChannelStatusStore owns persisted status flags for open channel records.
-type OpenChannelStatusStore[Channel any] interface {
+type OpenChannelStatusStore interface {
// ApplyChannelStatus adds the target status to the channel's
// persisted status bit field.
- ApplyChannelStatus(channel Channel, status ChannelStatus) error
+ ApplyChannelStatus(channel *OpenChannel, status ChannelStatus) error
// ClearChannelStatus clears the target status from the channel's
// persisted status bit field.
- ClearChannelStatus(channel Channel, status ChannelStatus) error
+ ClearChannelStatus(channel *OpenChannel, status ChannelStatus) error
// MarkChannelDataLoss marks the channel as local-data-loss and stores
// the commit point needed if the remote force closes.
- MarkChannelDataLoss(channel Channel,
+ MarkChannelDataLoss(channel *OpenChannel,
commitPoint *btcec.PublicKey) error
// FetchChannelDataLossCommitPoint retrieves the commit point stored
// when the channel was marked as local-data-loss.
- FetchChannelDataLossCommitPoint(channel Channel) (
+ FetchChannelDataLossCommitPoint(channel *OpenChannel) (
*btcec.PublicKey, error)
// MarkChannelBorked marks the channel as irreconcilable.
- MarkChannelBorked(channel Channel) error
+ MarkChannelBorked(channel *OpenChannel) error
}
// OpenChannelShutdownStore owns persisted shutdown state.
-type OpenChannelShutdownStore[Channel any] interface {
+type OpenChannelShutdownStore interface {
// StoreChannelShutdownInfo persists the ShutdownInfo for the target
// channel.
- StoreChannelShutdownInfo(channel Channel, info *ShutdownInfo) error
+ StoreChannelShutdownInfo(channel *OpenChannel, info *ShutdownInfo) error
// FetchChannelShutdownInfo fetches the persisted ShutdownInfo for the
// target channel.
- FetchChannelShutdownInfo(channel Channel) (fn.Option[ShutdownInfo],
- error)
+ FetchChannelShutdownInfo(channel *OpenChannel) (
+ fn.Option[ShutdownInfo], error)
}
// OpenChannelCloseTxStore owns persisted closing transaction state.
-type OpenChannelCloseTxStore[Channel any] interface {
+type OpenChannelCloseTxStore interface {
// MarkChannelCommitmentBroadcasted marks the channel as having a
// commitment transaction broadcast.
- MarkChannelCommitmentBroadcasted(channel Channel, closeTx *wire.MsgTx,
- closer lntypes.ChannelParty) error
+ MarkChannelCommitmentBroadcasted(channel *OpenChannel,
+ closeTx *wire.MsgTx, closer lntypes.ChannelParty) error
// MarkChannelCoopBroadcasted marks the channel as having a
// cooperative close transaction broadcast.
- MarkChannelCoopBroadcasted(channel Channel, closeTx *wire.MsgTx,
+ MarkChannelCoopBroadcasted(channel *OpenChannel, closeTx *wire.MsgTx,
closer lntypes.ChannelParty) error
// FetchChannelBroadcastedCommitment fetches the stored unilateral
// closing transaction.
- FetchChannelBroadcastedCommitment(channel Channel) (*wire.MsgTx,
+ FetchChannelBroadcastedCommitment(channel *OpenChannel) (*wire.MsgTx,
error)
// FetchChannelBroadcastedCooperative fetches the stored cooperative
// closing transaction.
- FetchChannelBroadcastedCooperative(channel Channel) (*wire.MsgTx,
+ FetchChannelBroadcastedCooperative(channel *OpenChannel) (*wire.MsgTx,
error)
}
// OpenChannelCommitmentStore owns persisted commitment state for open channel
// records.
-type OpenChannelCommitmentStore[Channel any] interface {
- OpenChannelCommitmentMutationStore[Channel]
- OpenChannelCommitmentQueryStore[Channel]
+type OpenChannelCommitmentStore interface {
+ OpenChannelCommitmentMutationStore
+ OpenChannelCommitmentQueryStore
}
// OpenChannelCommitmentMutationStore owns persisted commitment mutations for
// open channel records.
-type OpenChannelCommitmentMutationStore[Channel any] interface {
+type OpenChannelCommitmentMutationStore interface {
// UpdateChannelCommitment updates the local commitment state. It
// locks in pending local updates received from the remote party and
// persists remote log updates that have been acked, but not signed
// for yet. The returned map contains all HTLC resolutions locked into
// this commitment, keyed by HTLC index.
- UpdateChannelCommitment(channel Channel,
+ UpdateChannelCommitment(channel *OpenChannel,
newCommitment *ChannelCommitment,
unsignedAckedUpdates []LogUpdate) (map[uint64]bool, error)
// AppendRemoteCommitChain appends a new CommitDiff to the remote
// party's commitment chain. This is used after preparing a new remote
// commitment state, before transmitting it to the remote party.
- AppendRemoteCommitChain(channel Channel, diff *CommitDiff) error
+ AppendRemoteCommitChain(channel *OpenChannel, diff *CommitDiff) error
// RemoteCommitChainTip returns the "tip" of the current remote
// commitment chain.
- RemoteCommitChainTip(channel Channel) (*CommitDiff, error)
+ RemoteCommitChainTip(channel *OpenChannel) (*CommitDiff, error)
// UnsignedAckedUpdates retrieves the persisted unsigned acked remote
// log updates that still need to be signed for.
- UnsignedAckedUpdates(channel Channel) ([]LogUpdate, error)
+ UnsignedAckedUpdates(channel *OpenChannel) ([]LogUpdate, error)
// RemoteUnsignedLocalUpdates retrieves the persisted, unsigned local
// log updates that the remote still needs to sign for.
- RemoteUnsignedLocalUpdates(channel Channel) ([]LogUpdate, error)
+ RemoteUnsignedLocalUpdates(channel *OpenChannel) ([]LogUpdate, error)
// InsertNextRevocation inserts the next commitment point into the
// persisted channel state.
- InsertNextRevocation(channel Channel, revKey *btcec.PublicKey) error
+ InsertNextRevocation(channel *OpenChannel,
+ revKey *btcec.PublicKey) error
// AdvanceCommitChainTail records the new state transition within the
// revocation log and promotes the pending remote commitment to the
// current remote commitment.
- AdvanceCommitChainTail(channel Channel, fwdPkg *FwdPkg,
+ AdvanceCommitChainTail(channel *OpenChannel, fwdPkg *FwdPkg,
updates []LogUpdate, ourOutputIndex,
theirOutputIndex uint32) error
}
// OpenChannelCommitmentQueryStore owns persisted commitment queries for open
// channel records.
-type OpenChannelCommitmentQueryStore[Channel any] interface {
+type OpenChannelCommitmentQueryStore interface {
// CommitmentHeight returns the current persisted commitment height.
- CommitmentHeight(channel Channel) (uint64, error)
+ CommitmentHeight(channel *OpenChannel) (uint64, error)
// LatestCommitments returns the two latest commitments for both the
// local and remote party.
- LatestCommitments(channel Channel) (*ChannelCommitment,
+ LatestCommitments(channel *OpenChannel) (*ChannelCommitment,
*ChannelCommitment, error)
// RemoteRevocationStore returns the most up to date commitment version
// of the revocation storage tree for the remote party.
- RemoteRevocationStore(channel Channel) (shachain.Store, error)
+ RemoteRevocationStore(channel *OpenChannel) (shachain.Store, error)
// FindPreviousState scans through the append-only log in an attempt to
// recover the previous channel state indicated by the update number.
- FindPreviousState(channel Channel, updateNum uint64) (
+ FindPreviousState(channel *OpenChannel, updateNum uint64) (
*RevocationLog, *ChannelCommitment, error)
}
-// OpenChannelFwdPkgStore owns forwarding packages tied to open channel records.
-type OpenChannelFwdPkgStore[Channel any] interface {
+// OpenChannelFwdPkgStore owns forwarding packages tied to open channel
+// records.
+type OpenChannelFwdPkgStore interface {
// LoadFwdPkgs loads forwarding packages that have not been processed.
- LoadFwdPkgs(channel Channel) ([]*FwdPkg, error)
+ LoadFwdPkgs(channel *OpenChannel) ([]*FwdPkg, error)
// AckAddHtlcs marks add HTLCs in forwarding packages as resolved.
- AckAddHtlcs(channel Channel, addRefs ...AddRef) error
+ AckAddHtlcs(channel *OpenChannel, addRefs ...AddRef) error
// AckSettleFails marks settles or fails as delivered to the incoming
// link.
- AckSettleFails(channel Channel, settleFailRefs ...SettleFailRef) error
+ AckSettleFails(channel *OpenChannel,
+ settleFailRefs ...SettleFailRef) error
// SetFwdFilter writes the forwarding filter for the forwarding package
// identified by height.
- SetFwdFilter(channel Channel, height uint64, fwdFilter *PkgFilter) error
+ SetFwdFilter(channel *OpenChannel, height uint64,
+ fwdFilter *PkgFilter) error
// RemoveFwdPkgs removes forwarding packages by remote commitment
// height.
- RemoveFwdPkgs(channel Channel, heights ...uint64) error
+ RemoveFwdPkgs(channel *OpenChannel, heights ...uint64) error
}
// ClosedChannelStore owns closed-channel summaries and lifecycle mutations.
-type ClosedChannelStore[Channel any] interface {
+type ClosedChannelStore interface {
// FetchClosedChannels attempts to fetch all closed channels from the
// database. The pendingOnly bool toggles if channels that aren't yet
// fully closed should be returned in the response or not. When a
@@ -351,7 +356,7 @@ type ClosedChannelStore[Channel any] interface {
// FetchClosedChannel and FetchClosedChannelForID. Any ChannelStatus
// values are merged into the archived summary. Returns
// ErrChannelCloseSummaryNil if summary is nil.
- CloseChannel(channel Channel, summary *ChannelCloseSummary,
+ CloseChannel(channel *OpenChannel, summary *ChannelCloseSummary,
statuses ...ChannelStatus) error
// AbandonChannel attempts to remove the target channel from the open
diff --git a/chanstate/log.go b/chanstate/log.go
index c41e9bb..029e91d 100644
--- a/chanstate/log.go
+++ b/chanstate/log.go
@@ -8,8 +8,6 @@ import (
// log is a logger that is initialized with no output filters. This means the
// package will not perform any logging by default until the caller requests
// it.
-//
-//nolint:unused
var log btclog.Logger
// init initializes the package-global logger instance.
diff --git a/chanstate/open_channel.go b/chanstate/open_channel.go
index 7cb7c83..5aefc18 100644
--- a/chanstate/open_channel.go
+++ b/chanstate/open_channel.go
@@ -228,7 +228,7 @@ type OpenChannel struct {
// channels through the channeldb compatibility alias. The store
// interface keeps receiver methods backend independent while the KV
// implementation remains in channeldb.
- Db Store[*OpenChannel]
+ Db Store
// TODO(roasbeef): just need to store local and remote HTLC's?
diff --git a/contractcourt/breach_arbitrator.go b/contractcourt/breach_arbitrator.go
index 4b23bdb..7b839e6 100644
--- a/contractcourt/breach_arbitrator.go
+++ b/contractcourt/breach_arbitrator.go
@@ -14,7 +14,6 @@ import (
"github.com/btcsuite/btcd/txscript/v2"
"github.com/btcsuite/btcd/wire/v2"
"github.com/lightningnetwork/lnd/chainntnfs"
- "github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/chanstate"
"github.com/lightningnetwork/lnd/fn/v2"
graphdb "github.com/lightningnetwork/lnd/graph/db"
@@ -143,7 +142,7 @@ type BreachConfig struct {
// DB provides access to the user's closed channels, allowing the breach
// arbiter to determine how it should respond to channel closure.
- DB chanstate.ClosedChannelStore[*channeldb.OpenChannel]
+ DB chanstate.ClosedChannelStore
// Estimator is used by the breach arbiter to determine an appropriate
// fee level when generating, signing, and broadcasting sweep
diff --git a/funding/manager.go b/funding/manager.go
index 5b9ab81..4efbb10 100644
--- a/funding/manager.go
+++ b/funding/manager.go
@@ -387,7 +387,7 @@ type Config struct {
// ChannelDB is the database that keeps track of channel state used by
// the funding flow.
- ChannelDB chanstate.Store[*channeldb.OpenChannel]
+ 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
diff --git a/htlcswitch/link_test.go b/htlcswitch/link_test.go
index ecd5ea2..d73a355 100644
--- a/htlcswitch/link_test.go
+++ b/htlcswitch/link_test.go
@@ -5772,7 +5772,7 @@ func TestChannelLinkCleanupSpuriousResponses(t *testing.T) {
// LoadFwdPkgs. This lets the link startup test inject a forwarding-package
// load failure through OpenChannel.Db without replacing the rest of the store.
type mockFailLoadFwdPkgStore struct {
- cstate.Store[*channeldb.OpenChannel]
+ cstate.Store
}
// LoadFwdPkgs fails the forwarding-package load to exercise link startup
diff --git a/lnrpc/invoicesrpc/addinvoice.go b/lnrpc/invoicesrpc/addinvoice.go
index 5f3357a..7610552 100644
--- a/lnrpc/invoicesrpc/addinvoice.go
+++ b/lnrpc/invoicesrpc/addinvoice.go
@@ -72,7 +72,7 @@ type AddInvoiceConfig struct {
DefaultCLTVExpiry uint32
// ChanDB is used to access open channel state.
- ChanDB chanstate.OpenChannelStore[*channeldb.OpenChannel]
+ ChanDB chanstate.OpenChannelStore
// Graph gives the invoice server access to various graph related
// queries.
diff --git a/lnrpc/invoicesrpc/config_active.go b/lnrpc/invoicesrpc/config_active.go
index f0f0a35..3a162bf 100644
--- a/lnrpc/invoicesrpc/config_active.go
+++ b/lnrpc/invoicesrpc/config_active.go
@@ -5,7 +5,6 @@ package invoicesrpc
import (
"github.com/btcsuite/btcd/chaincfg/v2"
- "github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/chanstate"
"github.com/lightningnetwork/lnd/invoices"
"github.com/lightningnetwork/lnd/lnwire"
@@ -58,7 +57,7 @@ type Config struct {
// ChanStateDB is a possibly replicated db instance which contains open
// channel state.
- ChanStateDB chanstate.OpenChannelStore[*channeldb.OpenChannel]
+ ChanStateDB chanstate.OpenChannelStore
// GenInvoiceFeatures returns a feature containing feature bits that
// should be advertised on freshly generated invoices.
diff --git a/lnrpc/walletrpc/config_active.go b/lnrpc/walletrpc/config_active.go
index 3a16ac4..33917b1 100644
--- a/lnrpc/walletrpc/config_active.go
+++ b/lnrpc/walletrpc/config_active.go
@@ -6,7 +6,6 @@ package walletrpc
import (
"github.com/btcsuite/btcd/chaincfg/v2"
"github.com/btcsuite/btcwallet/wallet"
- "github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/chanstate"
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/lnwallet"
@@ -80,5 +79,5 @@ type Config struct {
CoinSelectionStrategy wallet.CoinSelectionStrategy
// ChanStateDB is the reference to the open channel store.
- ChanStateDB chanstate.OpenChannelStore[*channeldb.OpenChannel]
+ ChanStateDB chanstate.OpenChannelStore
}
diff --git a/peer/brontide.go b/peer/brontide.go
index e701798..0a22005 100644
--- a/peer/brontide.go
+++ b/peer/brontide.go
@@ -261,7 +261,7 @@ type Config struct {
InterceptSwitch *htlcswitch.InterceptableSwitch
// ChannelDB is used to fetch channel state needed by the peer.
- ChannelDB chanstate.Store[*channeldb.OpenChannel]
+ ChannelDB chanstate.Store
// ChannelGraph is a pointer to the channel graph which is used to
// query information about the set of known active channels.
diff --git a/server.go b/server.go
index 2575f5c..bb6743e 100644
--- a/server.go
+++ b/server.go
@@ -326,7 +326,7 @@ type server struct {
graphDB *graphdb.ChannelGraph
v1Graph *graphdb.VersionedGraph
- chanStateDB chanstate.Store[*channeldb.OpenChannel]
+ chanStateDB chanstate.Store
linkNodeDB *channeldb.LinkNodeDB
addrSource channeldb.AddrSource
diff --git a/subrpcserver_config.go b/subrpcserver_config.go
index f7f80bf..8bd4b02 100644
--- a/subrpcserver_config.go
+++ b/subrpcserver_config.go
@@ -11,7 +11,6 @@ import (
"github.com/lightningnetwork/lnd/aliasmgr"
"github.com/lightningnetwork/lnd/autopilot"
"github.com/lightningnetwork/lnd/chainreg"
- "github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/chanstate"
"github.com/lightningnetwork/lnd/fn/v2"
graphdb "github.com/lightningnetwork/lnd/graph/db"
@@ -116,7 +115,7 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
routerBackend *routerrpc.RouterBackend,
nodeSigner *netann.NodeSigner,
graphDB *graphdb.ChannelGraph,
- chanStateDB chanstate.Store[*channeldb.OpenChannel],
+ chanStateDB chanstate.Store,
sweeper *sweep.UtxoSweeper,
tower *watchtower.Standalone,
towerClientMgr *wtclient.Manager,
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.