mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 14:40:30 +01:00
routing: use new graph.DB interface in ChannelRouter
This commit is contained in:
parent
be84d6974e
commit
30e6671a13
2 changed files with 3 additions and 3 deletions
|
@ -13,6 +13,7 @@ import (
|
||||||
"github.com/go-errors/errors"
|
"github.com/go-errors/errors"
|
||||||
"github.com/lightningnetwork/lnd/channeldb"
|
"github.com/lightningnetwork/lnd/channeldb"
|
||||||
"github.com/lightningnetwork/lnd/channeldb/models"
|
"github.com/lightningnetwork/lnd/channeldb/models"
|
||||||
|
"github.com/lightningnetwork/lnd/graph"
|
||||||
"github.com/lightningnetwork/lnd/lnwire"
|
"github.com/lightningnetwork/lnd/lnwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -313,7 +314,7 @@ type ChannelEdgeUpdate struct {
|
||||||
// constitutes. This function will also fetch any required auxiliary
|
// constitutes. This function will also fetch any required auxiliary
|
||||||
// information required to create the topology change update from the graph
|
// information required to create the topology change update from the graph
|
||||||
// database.
|
// database.
|
||||||
func addToTopologyChange(graph *channeldb.ChannelGraph, update *TopologyChange,
|
func addToTopologyChange(graph graph.DB, update *TopologyChange,
|
||||||
msg interface{}) error {
|
msg interface{}) error {
|
||||||
|
|
||||||
switch m := msg.(type) {
|
switch m := msg.(type) {
|
||||||
|
|
|
@ -253,8 +253,7 @@ type Config struct {
|
||||||
|
|
||||||
// Graph is the channel graph that the ChannelRouter will use to gather
|
// Graph is the channel graph that the ChannelRouter will use to gather
|
||||||
// metrics from and also to carry out path finding queries.
|
// metrics from and also to carry out path finding queries.
|
||||||
// TODO(roasbeef): make into an interface
|
Graph graph.DB
|
||||||
Graph *channeldb.ChannelGraph
|
|
||||||
|
|
||||||
// Chain is the router's source to the most up-to-date blockchain data.
|
// Chain is the router's source to the most up-to-date blockchain data.
|
||||||
// All incoming advertised channels will be checked against the chain
|
// All incoming advertised channels will be checked against the chain
|
||||||
|
|
Loading…
Add table
Reference in a new issue