mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 07:42:39 +02:00
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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user