mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
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:
@@ -486,6 +486,7 @@ func (d *testDBGraph) addRandChannel(node1, node2 *btcec.PublicKey,
|
||||
edge := &models.ChannelEdgeInfo{
|
||||
ChannelID: chanID.ToUint64(),
|
||||
Capacity: capacity,
|
||||
Features: lnwire.EmptyFeatureVector(),
|
||||
}
|
||||
edge.AddNodeKeys(lnNode1, lnNode2, lnNode1, lnNode2)
|
||||
if err := d.db.AddChannelEdge(ctx, edge); err != nil {
|
||||
|
Reference in New Issue
Block a user