mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
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>
This commit is contained in:
parent
d28ee02cbf
commit
c3cb7f1c85
2 changed files with 3 additions and 6 deletions
|
@ -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:
|
||||
*
|
||||
|
|
|
@ -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…
Add table
Reference in a new issue