routing: prune vertex, not ege after repeated FeeInsufficientErrors

In this commit, we modify the way we handle FeeInsufficientErrors to
more aggressively route around nodes that repeatedly return the same
error to us. This will ensure we skip older nodes on the network which
are running a buggier older version of lnd. Eventually most nodes will
upgrade to this new version, making this change less needed.

We also update the existing test to properly use a multi-hop route to
ensure that we route around the offending node.
This commit is contained in:
Olaoluwa Osuntokun committed 2018-04-06 14:52:02 -07:00
1 parent aa7f83d72e
commit a6ffe999c6
2 files changed
+15 -18

No files matched your search

+3 -3
View File
@@ -1724,12 +1724,12 @@ func (r *ChannelRouter) SendPayment(payment *LightningPayment) ([32]byte, *Route
// We'll now check to see if we've already
// reported a fee related failure for this
// node. If so, then we'll actually prune out
// the edge for now.
// the vertex for now.
chanID := update.ShortChannelID
_, ok := errFailedFeeChans[chanID]
if ok {
pruneEdgeFailure(
paySession, route, errSource,
pruneVertexFailure(
paySession, route, errSource, false,
)
continue
}