htlcswitch: within handleLocalDispatch bubble up the decode error

This commit is contained in:
Olaoluwa Osuntokun committed 2017-10-02 22:14:15 -07:00
1 parent 7038842f03
commit 30906b1a1a
1 file changed
+6 -1
+6 -1
View File
@@ -402,7 +402,12 @@ func (s *Switch) handleLocalDispatch(payment *pendingPayment, packet *htlcPacket
}
// Notify user that his payment was discarded.
payment.err <- failure
if userErr != nil {
payment.err <- userErr
} else {
payment.err <- failure
}
payment.preimage <- zeroPreimage
s.removePendingPayment(payment.amount, payment.paymentHash)