peer: depend on chanstate Store

Replace the peer config's concrete channel state DB dependency with
chanstate.Store. Brontide only needs channel lookups, closed-channel
lookup, and initial forwarding policy access from the channel-state
store.
This commit is contained in:
ziggie 2026-05-05 12:26:24 -03:00
parent ae9de8d078
commit d08b1b07c7
No known key found for this signature in database
GPG key ID: 1AFF9C4DCED6D666

View file

@ -26,6 +26,7 @@ import (
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/channelnotifier"
"github.com/lightningnetwork/lnd/chanstate"
"github.com/lightningnetwork/lnd/contractcourt"
"github.com/lightningnetwork/lnd/discovery"
"github.com/lightningnetwork/lnd/feature"
@ -259,8 +260,8 @@ type Config struct {
// ChannelLinkConfig.
InterceptSwitch *htlcswitch.InterceptableSwitch
// ChannelDB is used to fetch opened channels, and closed channels.
ChannelDB *channeldb.ChannelStateDB
// ChannelDB is used to fetch channel state needed by the peer.
ChannelDB chanstate.Store
// ChannelGraph is a pointer to the channel graph which is used to
// query information about the set of known active channels.