Merge pull request #5204 from yyforyongyu/fix-pathfind-feature-bit

routing: fix pathfind edge features being nil
This commit is contained in:
Olaoluwa Osuntokun 2021-04-13 15:34:54 -07:00 committed by GitHub
commit 41e2db6fbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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