mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 02:39:28 +01:00
lightningd: don't crash when simply using closingd just for retransmission.
test_closing_negotiation_reconnect (__main__.LightningDTests) ... peer state CLOSINGD_COMPLETE should be CLOSINGD_SIGEXCHANGE Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
7dce850844
commit
8b71ea924a
1 changed files with 4 additions and 0 deletions
|
@ -1276,6 +1276,10 @@ static int peer_closing_complete(struct peer *peer, const u8 *msg)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* Retransmission only, ignore closing. */
|
||||
if (peer->state == CLOSINGD_COMPLETE)
|
||||
return -1;
|
||||
|
||||
if (!peer->closing_sig_received) {
|
||||
peer_internal_error(peer,
|
||||
"closing_complete without sending sig!");
|
||||
|
|
Loading…
Add table
Reference in a new issue