routing: fix pathfind edge features being nil

This commit is contained in:
yyforyongyu 2021-04-13 15:53:18 +08:00
parent 213b264e4c
commit 37aa49c7aa
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868

@ -144,7 +144,14 @@ func newRoute(sourceVertex route.Vertex,
// vector for support for a given feature. We assume at this
// point that the feature vectors transitive dependencies have
// been validated.
supports := edge.Node.Features.HasFeature
supports := func(feature lnwire.FeatureBit) bool {
// If this edge comes from router hints, the features
// could be nil.
if edge.Node.Features == nil {
return false
}
return edge.Node.Features.HasFeature(feature)
}
// We start by assuming the node doesn't support TLV. We'll now
// inspect the node's feature vector to see if we can promote