refactor+multi: use *lnwire.FeatureVector for ChannelEdgeInfo features
In this commit, we move the serialisation details of a channel's features to the DB layer and change the `models` field to instead use a more useful `*lnwire.FeatureVector` type. This makes the features easier to work with and moves the serialisation to where it is actually used.
This commit is contained in:
14 files changed
+70
-78
No files matched your search
@@ -2741,6 +2741,7 @@ func TestAddEdgeUnknownVertexes(t *testing.T) {
|
||||
NodeKey2Bytes: pub2,
|
||||
BitcoinKey1Bytes: pub1,
|
||||
BitcoinKey2Bytes: pub2,
|
||||
Features: lnwire.EmptyFeatureVector(),
|
||||
AuthProof: nil,
|
||||
}
|
||||
require.NoError(t, ctx.graph.AddChannelEdge(ctxb, edge))
|
||||
@@ -2816,6 +2817,7 @@ func TestAddEdgeUnknownVertexes(t *testing.T) {
|
||||
|
||||
edge = &models.ChannelEdgeInfo{
|
||||
ChannelID: chanID.ToUint64(),
|
||||
Features: lnwire.EmptyFeatureVector(),
|
||||
AuthProof: nil,
|
||||
}
|
||||
copy(edge.NodeKey1Bytes[:], node1Bytes)
|
||||
|
||||
Reference in new issue
Block a user