Browse Source

channeld: don't assert that we're expecting revoke_and_ack.

We can have it happen on reconnect due to fee changes; we should really
detect this case, but it's harmless to let it happen as a noop.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
c3cb7f1c85
  1. 8
      channeld/channel.c
  2. 1
      channeld/full_channel.c

8
channeld/channel.c

@ -1114,11 +1114,9 @@ static struct io_plan *handle_peer_revoke_and_ack(struct io_conn *conn,
"Bad revoke_and_ack %s", tal_hex(msg, msg));
}
if (!channel_awaiting_revoke_and_ack(peer->channel))
peer_failed(io_conn_fd(peer->peer_conn),
&peer->pcs.cs,
&peer->channel_id,
"Unexpected revoke_and_ack");
/* FIXME: We can get unexpected revoke_and_ack due to retransmit; we
* should really detect this case and set
* channel_awaiting_revoke_and_ack; normally it will be true here. */
/* BOLT #2:
*

1
channeld/full_channel.c

@ -795,7 +795,6 @@ bool channel_rcvd_revoke_and_ack(struct channel *channel,
if (change & HTLC_LOCAL_F_PENDING)
channel->changes_pending[LOCAL] = true;
assert(channel->awaiting_revoke_and_ack);
channel->awaiting_revoke_and_ack = false;
/* For funder, ack also means time to apply new feerate locally. */

Loading…
Cancel
Save