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:
parent
158a32c4e1
commit
c5961d4904
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user