multi: move LightningNode struct to models package

This commit is contained in:
Elle Mouton committed 2024-11-28 13:36:32 +02:00
1 parent ccb8f0eeb8
commit 6e13898981
20 files changed
+252 -246

No files matched your search

+5 -5
View File
@@ -214,7 +214,7 @@ func parseTestGraph(t *testing.T, useCache bool, path string) (
privKeyMap := make(map[string]*btcec.PrivateKey)
channelIDs := make(map[route.Vertex]map[route.Vertex]uint64)
links := make(map[lnwire.ShortChannelID]htlcswitch.ChannelLink)
var source *graphdb.LightningNode
var source *models.LightningNode
// First we insert all the nodes within the graph as vertexes.
for _, node := range g.Nodes {
@@ -223,7 +223,7 @@ func parseTestGraph(t *testing.T, useCache bool, path string) (
return nil, err
}
dbNode := &graphdb.LightningNode{
dbNode := &models.LightningNode{
HaveNodeAnnouncement: true,
AuthSigBytes: testSig.Serialize(),
LastUpdate: testTime,
@@ -536,7 +536,7 @@ func createTestGraphFromChannels(t *testing.T, useCache bool,
nodeIndex := byte(0)
addNodeWithAlias := func(alias string, features *lnwire.FeatureVector) (
*graphdb.LightningNode, error) {
*models.LightningNode, error) {
keyBytes := []byte{
0, 0, 0, 0, 0, 0, 0, 0,
@@ -551,7 +551,7 @@ func createTestGraphFromChannels(t *testing.T, useCache bool,
features = lnwire.EmptyFeatureVector()
}
dbNode := &graphdb.LightningNode{
dbNode := &models.LightningNode{
HaveNodeAnnouncement: true,
AuthSigBytes: testSig.Serialize(),
LastUpdate: testTime,
@@ -1207,7 +1207,7 @@ func runPathFindingWithAdditionalEdges(t *testing.T, useCache bool) {
dogePubKey, err := btcec.ParsePubKey(dogePubKeyBytes)
require.NoError(t, err, "unable to parse public key from bytes")
doge := &graphdb.LightningNode{}
doge := &models.LightningNode{}
doge.AddPubKey(dogePubKey)
doge.Alias = "doge"
copy(doge.PubKeyBytes[:], dogePubKeyBytes)