routing: only warn for zero cltv delta edges

This condition may be caused by a bug somewhere else in the system.
Expose it here as a warn log line.
This commit is contained in:
Joost Jager 2019-02-13 11:21:10 +01:00
parent 158a32c4e1
commit c5961d4904
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7

@ -606,14 +606,11 @@ func findPath(g *graphParams, r *RestrictParams, source, target Vertex,
return
}
// If the edge has no time lock delta, the payment will always
// fail, so return.
//
// TODO(joostjager): Is this really true? Can't it be that
// nodes take this risk in exchange for a extraordinary high
// fee?
// Every edge should have a positive time lock delta. If we
// encounter a zero delta, log a warning line.
if edge.TimeLockDelta == 0 {
return
log.Warnf("Channel %v has zero cltv delta",
edge.ChannelID)
}
// All conditions are met and this new tentative distance is