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

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)