multi: move LightningNode struct to models package

This commit is contained in:
Elle Mouton
2024-10-29 18:25:07 +02:00
parent ccb8f0eeb8
commit 6e13898981
20 changed files with 252 additions and 246 deletions

View File

@@ -3,7 +3,6 @@ package routing
import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/lightningnetwork/lnd/fn"
graphdb "github.com/lightningnetwork/lnd/graph/db"
"github.com/lightningnetwork/lnd/graph/db/models"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/routing/route"
@@ -24,7 +23,7 @@ type SessionSource struct {
GraphSessionFactory GraphSessionFactory
// SourceNode is the graph's source node.
SourceNode *graphdb.LightningNode
SourceNode *models.LightningNode
// GetLink is a method that allows querying the lower link layer
// to determine the up to date available bandwidth at a prospective link
@@ -101,7 +100,7 @@ func RouteHintsToEdges(routeHints [][]zpay32.HopHint, target route.Vertex) (
// we'll need to look at the next hint's start node. If
// we've reached the end of the hints list, we can
// assume we've reached the destination.
endNode := &graphdb.LightningNode{}
endNode := &models.LightningNode{}
if i != len(routeHint)-1 {
endNode.AddPubKey(routeHint[i+1].NodeID)
} else {