htlcswitch: within handleLocalDispatch bubble up the decode error
This commit is contained in:
parent
7038842f03
commit
30906b1a1a
@ -402,7 +402,12 @@ func (s *Switch) handleLocalDispatch(payment *pendingPayment, packet *htlcPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Notify user that his payment was discarded.
|
// Notify user that his payment was discarded.
|
||||||
payment.err <- failure
|
if userErr != nil {
|
||||||
|
payment.err <- userErr
|
||||||
|
} else {
|
||||||
|
payment.err <- failure
|
||||||
|
}
|
||||||
|
|
||||||
payment.preimage <- zeroPreimage
|
payment.preimage <- zeroPreimage
|
||||||
s.removePendingPayment(payment.amount, payment.paymentHash)
|
s.removePendingPayment(payment.amount, payment.paymentHash)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user