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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the edge has no time lock delta, the payment will always
|
// Every edge should have a positive time lock delta. If we
|
||||||
// fail, so return.
|
// encounter a zero delta, log a warning line.
|
||||||
//
|
|
||||||
// TODO(joostjager): Is this really true? Can't it be that
|
|
||||||
// nodes take this risk in exchange for a extraordinary high
|
|
||||||
// fee?
|
|
||||||
if edge.TimeLockDelta == 0 {
|
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
|
// All conditions are met and this new tentative distance is
|
||||||
|
Loading…
Reference in New Issue
Block a user