Browse Source

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>
travis-debug
Rusty Russell 5 years ago
committed by Christian Decker
parent
commit
8eda489ae2
  1. 5
      lightningd/peer_htlcs.c

5
lightningd/peer_htlcs.c

@ -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,

Loading…
Cancel
Save