mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-05-30 01:30:11 +02:00
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:
parent
36d8bb2a4e
commit
8bf10b183d
@ -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[:])
|
||||
|
Loading…
x
Reference in New Issue
Block a user