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:
1 file changed
+8
-4
@@ -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[:])
|
||||
|
||||
Reference in new issue
Block a user