multi: Update lnd to use new feature vector API.

This commit is contained in:
Jim Posen
2017-10-11 11:37:54 -07:00
committed by Olaoluwa Osuntokun
parent af49752d4d
commit 9fd77a6e40
16 changed files with 49 additions and 63 deletions

View File

@@ -647,6 +647,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(nMsg *networkMsg) []l
}
}
features := lnwire.NewFeatureVector(msg.Features, lnwire.GlobalFeatures)
node := &channeldb.LightningNode{
HaveNodeAnnouncement: true,
LastUpdate: time.Unix(int64(msg.Timestamp), 0),
@@ -654,7 +655,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(nMsg *networkMsg) []l
PubKey: msg.NodeID,
Alias: msg.Alias.String(),
AuthSig: msg.Signature,
Features: msg.Features,
Features: features,
}
if err := d.cfg.Router.AddNode(node); err != nil {
@@ -1178,7 +1179,7 @@ func (d *AuthenticatedGossiper) synchronizeWithNode(syncReq *syncRequest) error
Addresses: node.Addresses,
NodeID: node.PubKey,
Alias: alias,
Features: node.Features,
Features: node.Features.RawFeatureVector,
}
announceMessages = append(announceMessages, ann)
@@ -1258,7 +1259,7 @@ func (d *AuthenticatedGossiper) updateChannel(info *channeldb.ChannelEdgeInfo,
NodeID2: info.NodeKey2,
ChainHash: info.ChainHash,
BitcoinKey1: info.BitcoinKey1,
Features: lnwire.NewFeatureVector([]lnwire.Feature{}),
Features: lnwire.NewRawFeatureVector(),
BitcoinKey2: info.BitcoinKey2,
}
}