mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 09:04:22 +01:00
peer: fix close before their sig has been received in corner case.
If we haven't received their closing signature yet, we might try to send the closing packet anyway (and segfault). Make sure we have their signature before trying that. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1382,7 +1382,7 @@ static bool shutdown_pkt_in(struct peer *peer, const Pkt *pkt)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!err && !committed_to_htlcs(peer))
|
||||
if (!err && !committed_to_htlcs(peer) && peer->closing.their_script)
|
||||
err = start_closing(peer);
|
||||
|
||||
if (err)
|
||||
|
||||
Reference in New Issue
Block a user