htlcswitch: within handleLocalDispatch bubble up the decode error

This commit is contained in:
Olaoluwa Osuntokun 2017-10-02 22:06:18 -07:00
parent 7038842f03
commit 30906b1a1a
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -402,7 +402,12 @@ func (s *Switch) handleLocalDispatch(payment *pendingPayment, packet *htlcPacket
}
// Notify user that his payment was discarded.
if userErr != nil {
payment.err <- userErr
} else {
payment.err <- failure
}
payment.preimage <- zeroPreimage
s.removePendingPayment(payment.amount, payment.paymentHash)