mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-09 08:04:19 +01:00
bugfix: Assert was killing daemon
This seems rather easy to fix, the only case we do not want to set `STATE_SHUTDOWN` us when we have updates which we have not committed yet, which is handled separately in the other IF-branch.
This commit is contained in:
committed by
Rusty Russell
parent
8912272983
commit
26d4042436
@@ -1856,10 +1856,9 @@ static bool peer_start_shutdown(struct peer *peer)
|
||||
|
||||
queue_pkt_close_shutdown(peer);
|
||||
|
||||
if (peer->state == STATE_NORMAL_COMMITTING)
|
||||
if (peer->state == STATE_NORMAL_COMMITTING) {
|
||||
newstate = STATE_SHUTDOWN_COMMITTING;
|
||||
else {
|
||||
assert(peer->state == STATE_NORMAL);
|
||||
} else {
|
||||
newstate = STATE_SHUTDOWN;
|
||||
}
|
||||
set_peer_state(peer, newstate, __func__, true);
|
||||
|
||||
Reference in New Issue
Block a user