multi: Update lnd to use new feature vector API.

This commit is contained in:
Jim Posen authored and Olaoluwa Osuntokun committed 2017-10-17 22:47:20 -07:00
1 parent af49752d4d
commit 9fd77a6e40
16 files changed
+49 -63

No files matched your search

+4 -3
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,
}
}
+1 -1
View File
@@ -31,7 +31,7 @@ var (
testAddr = &net.TCPAddr{IP: (net.IP)([]byte{0xA, 0x0, 0x0, 0x1}),
Port: 9000}
testAddrs = []net.Addr{testAddr}
testFeatures = lnwire.NewFeatureVector([]lnwire.Feature{})
testFeatures = lnwire.NewRawFeatureVector()
testSig = &btcec.Signature{
R: new(big.Int),
S: new(big.Int),
+1 -1
View File
@@ -32,7 +32,7 @@ func createChanAnnouncement(chanProof *channeldb.ChannelAuthProof,
NodeID2: chanInfo.NodeKey2,
ChainHash: chanInfo.ChainHash,
BitcoinKey1: chanInfo.BitcoinKey1,
Features: lnwire.NewFeatureVector([]lnwire.Feature{}),
Features: lnwire.NewRawFeatureVector(),
BitcoinKey2: chanInfo.BitcoinKey2,
}