mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-04 06:44:24 +01:00
lightningd: add initializing state.
Importantly, the code in jsonrpc.c which actually does the io_break:
```
/* Once the stop_conn conn is drained, we can shut down. */
if (jcon->ld->stop_conn == conn && jcon->ld->state == LD_STATE_RUNNING) {
/* Return us to toplevel lightningd.c */
log_debug(jcon->ld->log, "io_break: %s", __func__);
io_break(jcon->ld);
```
By having the state not set until later, we avoid running this. Of course,
we need to avoid calling the main loop when we get there, if we've already
been told to shutdown.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Vincenzo Palazzo
parent
30335e1dc3
commit
45193db7ea
@@ -3239,7 +3239,6 @@ def test_create_gossip_mesh(node_factory, bitcoind):
|
||||
assert False, "Test failed on purpose, grab the gossip store from /tmp/ltests-..."
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True)
|
||||
def test_fast_shutdown(node_factory):
|
||||
l1 = node_factory.get_node(start=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user