graph/db: make all ExtraOpaqueData valid TLV streams

Later when we introduce our SQL version of the graph store, we will
normalise the persistence of the ExtraOpaqueData using the fact that it
is always made up of TLV entries. So we update our tests here to ensure
that they use valid TLV streams as examples.
This commit is contained in:
Elle Mouton 2025-04-05 17:03:42 +02:00
parent 36d8bb2a4e
commit 8bf10b183d
No known key found for this signature in database
GPG Key ID: D7D916376026F177

View File

@ -110,7 +110,7 @@ func TestNodeInsertionAndDeletion(t *testing.T) {
Alias: "kek",
Features: testFeatures,
Addresses: testAddrs,
ExtraOpaqueData: []byte("extra new data"),
ExtraOpaqueData: []byte{1, 1, 1, 2, 2, 2, 2},
PubKeyBytes: testPub,
}
@ -631,9 +631,13 @@ func createChannelEdge(node1, node2 *models.LightningNode) (
BitcoinSig1Bytes: testSig.Serialize(),
BitcoinSig2Bytes: testSig.Serialize(),
},
ChannelPoint: outpoint,
Capacity: 1000,
ExtraOpaqueData: []byte("new unknown feature"),
ChannelPoint: outpoint,
Capacity: 1000,
ExtraOpaqueData: []byte{
1, 1, 1,
2, 2, 2, 2,
3, 3, 3, 3, 3,
},
}
copy(edgeInfo.NodeKey1Bytes[:], firstNode[:])
copy(edgeInfo.NodeKey2Bytes[:], secondNode[:])