graph/db+channeldb: rename test helper

This commit is contained in:
Elle Mouton committed 2025-09-03 10:14:35 +02:00
1 parent 330f697937
commit 6e98b336f6
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -807,7 +807,7 @@ func TestFetchPermTempPeer(t *testing.T) {
) )
} }
func createLightningNode(priv *btcec.PrivateKey) *models.Node { func createNode(priv *btcec.PrivateKey) *models.Node {
updateTime := rand.Int63() updateTime := rand.Int63()
pub := priv.PubKey().SerializeCompressed() pub := priv.PubKey().SerializeCompressed()
@@ -829,5 +829,5 @@ func createTestVertex(t *testing.T) *models.Node {
priv, err := btcec.NewPrivateKey() priv, err := btcec.NewPrivateKey()
require.NoError(t, err) require.NoError(t, err)
return createLightningNode(priv) return createNode(priv)
} }
+3 -3
View File
@@ -69,7 +69,7 @@ var (
} }
) )
func createLightningNode(priv *btcec.PrivateKey) *models.Node { func createNode(priv *btcec.PrivateKey) *models.Node {
pub := priv.PubKey().SerializeCompressed() pub := priv.PubKey().SerializeCompressed()
n := &models.Node{ n := &models.Node{
HaveNodeAnnouncement: true, HaveNodeAnnouncement: true,
@@ -91,7 +91,7 @@ func createTestVertex(t testing.TB) *models.Node {
priv, err := btcec.NewPrivateKey() priv, err := btcec.NewPrivateKey()
require.NoError(t, err) require.NoError(t, err)
return createLightningNode(priv) return createNode(priv)
} }
// TestNodeInsertionAndDeletion tests the CRUD operations for a Node. // TestNodeInsertionAndDeletion tests the CRUD operations for a Node.
@@ -4069,7 +4069,7 @@ func TestLightningNodeSigVerification(t *testing.T) {
} }
// Create a Node from the same private key. // Create a Node from the same private key.
node := createLightningNode(priv) node := createNode(priv)
// And finally check that we can verify the same signature from the // And finally check that we can verify the same signature from the
// pubkey returned from the lightning node. // pubkey returned from the lightning node.