Skip to content

Commit 3751d7a

Browse files
authored
Merge pull request #10199 from ellemouton/fixBuild
graph/db: fix type name
2 parents e46c676 + f2fa0a4 commit 3751d7a

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

graph/db/sql_migration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ func migrateNodes(ctx context.Context, cfg *sqldb.QueryConfig,
333333
// maybeOverrideNodeAddresses checks if the node has any opaque addresses that
334334
// can be parsed. If so, it replaces the node's addresses with the parsed
335335
// addresses. If the address is unparseable, it returns an error.
336-
func maybeOverrideNodeAddresses(node *models.LightningNode) error {
336+
func maybeOverrideNodeAddresses(node *models.Node) error {
337337
// In the majority of cases, the number of node addresses will remain
338338
// unchanged, so we pre-allocate a slice of the same length.
339339
addrs := make([]net.Addr, 0, len(node.Addresses))

graph/db/sql_migration_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,12 +1255,12 @@ func TestSQLMigrationEdgeCases(t *testing.T) {
12551255
func(t *testing.T) {
12561256
t.Parallel()
12571257

1258-
var expectedNodes []*models.LightningNode
1258+
var expectedNodes []*models.Node
12591259

12601260
// Let the first node have an opaque address that we
12611261
// still don't understand. This node will remain the
12621262
// same in the SQL store.
1263-
n1 := makeTestNode(t, func(n *models.LightningNode) {
1263+
n1 := makeTestNode(t, func(n *models.Node) {
12641264
n.Addresses = []net.Addr{
12651265
testOpaqueAddr,
12661266
}
@@ -1272,7 +1272,7 @@ func TestSQLMigrationEdgeCases(t *testing.T) {
12721272
// only contain a DNS address and so the migrated node
12731273
// will only contain a DNS address and no opaque
12741274
// address.
1275-
n2 := makeTestNode(t, func(n *models.LightningNode) {
1275+
n2 := makeTestNode(t, func(n *models.Node) {
12761276
n.Addresses = []net.Addr{
12771277
testOpaqueAddrWithEmbeddedDNSAddr,
12781278
}
@@ -1287,7 +1287,7 @@ func TestSQLMigrationEdgeCases(t *testing.T) {
12871287
// wraps a DNS address along with some other data.
12881288
// So the resulting migrated node should have both
12891289
// the DNS address and remaining opaque address data.
1290-
n3 := makeTestNode(t, func(n *models.LightningNode) {
1290+
n3 := makeTestNode(t, func(n *models.Node) {
12911291
n.Addresses = []net.Addr{
12921292
//nolint:ll
12931293
testOpaqueAddrWithEmbeddedDNSAddrAndMore,
@@ -1304,7 +1304,7 @@ func TestSQLMigrationEdgeCases(t *testing.T) {
13041304
// wraps an invalid DNS address. Such a node will not be
13051305
// migrated since propagating an invalid DNS address
13061306
// is not allowed.
1307-
n4 := makeTestNode(t, func(n *models.LightningNode) {
1307+
n4 := makeTestNode(t, func(n *models.Node) {
13081308
n.Addresses = []net.Addr{
13091309
testOpaqueAddrWithEmbeddedBadDNSAddr,
13101310
}
@@ -1318,7 +1318,7 @@ func TestSQLMigrationEdgeCases(t *testing.T) {
13181318
// invalid at a protocol level, and so we should not
13191319
// propagate such addresses, but this is left to higher
13201320
// level gossip logic.
1321-
n5 := makeTestNode(t, func(n *models.LightningNode) {
1321+
n5 := makeTestNode(t, func(n *models.Node) {
13221322
n.Addresses = []net.Addr{
13231323
testOpaqueAddrWithTwoEmbeddedDNSAddrs,
13241324
}
@@ -1331,11 +1331,11 @@ func TestSQLMigrationEdgeCases(t *testing.T) {
13311331
expectedNodes = append(expectedNodes, &n5Expected)
13321332

13331333
populateKV := func(t *testing.T, db *KVStore) {
1334-
require.NoError(t, db.AddLightningNode(ctx, n1))
1335-
require.NoError(t, db.AddLightningNode(ctx, n2))
1336-
require.NoError(t, db.AddLightningNode(ctx, n3))
1337-
require.NoError(t, db.AddLightningNode(ctx, n4))
1338-
require.NoError(t, db.AddLightningNode(ctx, n5))
1334+
require.NoError(t, db.AddNode(ctx, n1))
1335+
require.NoError(t, db.AddNode(ctx, n2))
1336+
require.NoError(t, db.AddNode(ctx, n3))
1337+
require.NoError(t, db.AddNode(ctx, n4))
1338+
require.NoError(t, db.AddNode(ctx, n5))
13391339
}
13401340

13411341
runTestMigration(t, populateKV, dbState{

0 commit comments

Comments
 (0)