lightningd: don't stop processing revoke_and_ack if an HTLC is invalid.

This shouldn't happen if channeld is working properly, but I'm going to
change that, and this current code means we stop responding at that point
(not every failpath in peer_accepted_htlc() called channel_internal_error).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-01-23 16:20:38 +10:30
committed by Christian Decker
parent bfcef9002e
commit 8eda489ae2

View File

@@ -1682,9 +1682,8 @@ void peer_got_revoke(struct channel *channel, const u8 *msg)
for (i = 0; i < tal_count(changed); i++) {
/* If we're doing final accept, we need to forward */
if (changed[i].newstate == RCVD_ADD_ACK_REVOCATION) {
if (!peer_accepted_htlc(channel, changed[i].id, false,
&failcodes[i]))
return;
peer_accepted_htlc(channel, changed[i].id, false,
&failcodes[i]);
} else {
if (!changed_htlc(channel, &changed[i])) {
channel_internal_error(channel,