multi: deprecate IncorrectHtlcAmount onion error

In this commit, we deprecate the `IncorrectHtlcAmount` onion error.
We'll still decode this error to use when retrying paths, but we'll no
longer send this ourselves. The `UnknownPaymentHash` error has been
amended to also include the value of the payment as well. This allows us
to worry about one less error.
This commit is contained in:
orbitalturtle authored and Olaoluwa Osuntokun committed 2019-01-29 18:21:13 -08:00
1 parent fd1bbe63cf
commit 08750f180b
5 files changed
+85 -39

No files matched your search

+3 -2
View File
@@ -1843,8 +1843,9 @@ func (r *ChannelRouter) sendPayment(payment *LightningPayment,
}
switch onionErr := fErr.FailureMessage.(type) {
// If the end destination didn't know they payment
// hash, then we'll terminate immediately.
// If the end destination didn't know the payment
// hash or we sent the wrong payment amount to the
// destination, then we'll terminate immediately.
case *lnwire.FailUnknownPaymentHash:
return preImage, nil, sendError