From d08b1b07c77d43e131b00a94bb1797bb3e82d197 Mon Sep 17 00:00:00 2001 From: ziggie Date: Tue, 5 May 2026 12:26:24 -0300 Subject: [PATCH] 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. --- peer/brontide.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/peer/brontide.go b/peer/brontide.go index 01d948beb..f7a01cd11 100644 --- a/peer/brontide.go +++ b/peer/brontide.go @@ -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.