mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
routing: relax penalties for channel disabled errors
It was being considered a misbehaviour from the intermediate hop which penalized that hop, which is a bit harsh considering mobile nodes. We change it be considered as other channel update types and only penalize the channel that failed.
This commit is contained in:
parent
29a8661517
commit
78ce3abee5
@ -296,6 +296,12 @@ you.
|
||||
* [Save compressed log files from logrorate during
|
||||
itest](https://github.com/lightningnetwork/lnd/pull/5354).
|
||||
|
||||
## Mission control
|
||||
|
||||
* [Interpretation of channel disabled errors was changed to only penalize t
|
||||
he destination node to consider mobile wallets with hub
|
||||
nodes.](https://github.com/lightningnetwork/lnd/pull/5598)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
* A bug has been fixed that would cause `lnd` to [try to bootstrap using the
|
||||
|
@ -335,6 +335,19 @@ func (i *interpretedResult) processPaymentOutcomeIntermediate(
|
||||
case *lnwire.FailUnknownNextPeer:
|
||||
reportOutgoing()
|
||||
|
||||
// Some implementations use this error when the next hop is offline, so we
|
||||
// do the same as FailUnknownNextPeer and also process the channel update.
|
||||
case *lnwire.FailChannelDisabled:
|
||||
|
||||
// Set the node pair for which a channel update may be out of
|
||||
// date. The second chance logic uses the policyFailure field.
|
||||
i.policyFailure = &DirectedNodePair{
|
||||
From: route.Hops[errorSourceIdx-1].PubKeyBytes,
|
||||
To: route.Hops[errorSourceIdx].PubKeyBytes,
|
||||
}
|
||||
|
||||
reportOutgoing()
|
||||
|
||||
// If we get a permanent channel, we'll prune the channel set in both
|
||||
// directions and continue with the rest of the routes.
|
||||
case *lnwire.FailPermanentChannelFailure:
|
||||
@ -349,8 +362,7 @@ func (i *interpretedResult) processPaymentOutcomeIntermediate(
|
||||
// control.
|
||||
case *lnwire.FailAmountBelowMinimum,
|
||||
*lnwire.FailFeeInsufficient,
|
||||
*lnwire.FailIncorrectCltvExpiry,
|
||||
*lnwire.FailChannelDisabled:
|
||||
*lnwire.FailIncorrectCltvExpiry:
|
||||
|
||||
// Set the node pair for which a channel update may be out of
|
||||
// date. The second chance logic uses the policyFailure field.
|
||||
|
Loading…
Reference in New Issue
Block a user