routing/blindedpath: dont error out unless all paths fail

In this commit, we adjust BuildBlindedPaymentPaths to only error out
completely if none of the paths it received from FindRoutes resulted in
a usable blinded path.
This commit is contained in:
Elle Mouton
2024-08-05 14:04:07 +02:00
parent 3de6c5415a
commit b490deefdf
2 changed files with 73 additions and 3 deletions

View File

@@ -141,10 +141,11 @@ func BuildBlindedPaymentPaths(cfg *BuildBlindedPathCfg) (
route)
continue
}
} else if err != nil {
log.Errorf("Not using route (%s) as a blinded path: %v",
err)
if err != nil {
return nil, err
continue
}
paths = append(paths, path)