routing: don't treat bad features as an unexpected error
Previous behavior led to the payment loop being abandoned immediately, resulting in a payment stuck in state in_flight.
This commit is contained in:
3 files changed
+23
-9
No files matched your search
+4
-2
@@ -420,13 +420,15 @@ func findPath(g *graphParams, r *RestrictParams, cfg *PathFindingConfig,
|
||||
// required features.
|
||||
err := feature.ValidateRequired(features)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
log.Warnf("Pathfinding destination node features: %v", err)
|
||||
return nil, errUnknownRequiredFeature
|
||||
}
|
||||
|
||||
// Ensure that all transitive dependencies are set.
|
||||
err = feature.ValidateDeps(features)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
log.Warnf("Pathfinding destination node features: %v", err)
|
||||
return nil, errMissingDependentFeature
|
||||
}
|
||||
|
||||
// Now that we know the feature vector is well formed, we'll proceed in
|
||||
|
||||
Reference in new issue
Block a user