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
@@ -458,6 +458,7 @@ func TestEdgeUpdateNotification(t *testing.T) {
|
||||
BitcoinSig1Bytes: testSig.Serialize(),
|
||||
BitcoinSig2Bytes: testSig.Serialize(),
|
||||
},
|
||||
Features: lnwire.EmptyFeatureVector(),
|
||||
ChannelPoint: *chanPoint,
|
||||
Capacity: chanValue,
|
||||
FundingScript: fn.Some(script),
|
||||
@@ -645,6 +646,7 @@ func TestNodeUpdateNotification(t *testing.T) {
|
||||
ChannelID: chanID.ToUint64(),
|
||||
NodeKey1Bytes: node1.PubKeyBytes,
|
||||
NodeKey2Bytes: node2.PubKeyBytes,
|
||||
Features: lnwire.EmptyFeatureVector(),
|
||||
AuthProof: &models.ChannelAuthProof{
|
||||
NodeSig1Bytes: testSig.Serialize(),
|
||||
NodeSig2Bytes: testSig.Serialize(),
|
||||
@@ -839,6 +841,7 @@ func TestNotificationCancellation(t *testing.T) {
|
||||
BitcoinSig1Bytes: testSig.Serialize(),
|
||||
BitcoinSig2Bytes: testSig.Serialize(),
|
||||
},
|
||||
Features: lnwire.EmptyFeatureVector(),
|
||||
ChannelPoint: *chanPoint,
|
||||
Capacity: chanValue,
|
||||
FundingScript: fn.Some(script),
|
||||
@@ -914,6 +917,7 @@ func TestChannelCloseNotification(t *testing.T) {
|
||||
BitcoinSig1Bytes: testSig.Serialize(),
|
||||
BitcoinSig2Bytes: testSig.Serialize(),
|
||||
},
|
||||
Features: lnwire.EmptyFeatureVector(),
|
||||
ChannelPoint: *chanUtxo,
|
||||
Capacity: chanValue,
|
||||
FundingScript: fn.Some(script),
|
||||
|
||||
Reference in new issue
Block a user