From 30e6671a130ea072b89e529f9592e693be4eddff Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Sun, 16 Jun 2024 19:02:55 -0400 Subject: [PATCH] routing: use new graph.DB interface in ChannelRouter --- routing/notifications.go | 3 ++- routing/router.go | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routing/notifications.go b/routing/notifications.go index 3afbb1533..7263b9a47 100644 --- a/routing/notifications.go +++ b/routing/notifications.go @@ -13,6 +13,7 @@ import ( "github.com/go-errors/errors" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/channeldb/models" + "github.com/lightningnetwork/lnd/graph" "github.com/lightningnetwork/lnd/lnwire" ) @@ -313,7 +314,7 @@ type ChannelEdgeUpdate struct { // constitutes. This function will also fetch any required auxiliary // information required to create the topology change update from the graph // database. -func addToTopologyChange(graph *channeldb.ChannelGraph, update *TopologyChange, +func addToTopologyChange(graph graph.DB, update *TopologyChange, msg interface{}) error { switch m := msg.(type) { diff --git a/routing/router.go b/routing/router.go index f722c2664..276744d1b 100644 --- a/routing/router.go +++ b/routing/router.go @@ -253,8 +253,7 @@ type Config struct { // Graph is the channel graph that the ChannelRouter will use to gather // metrics from and also to carry out path finding queries. - // TODO(roasbeef): make into an interface - Graph *channeldb.ChannelGraph + Graph graph.DB // Chain is the router's source to the most up-to-date blockchain data. // All incoming advertised channels will be checked against the chain