Commit c80ab663 authored by Grégoire Henry's avatar Grégoire Henry

Shell: improve termination

Kill the `DistributedDB` before anything else.
parent 359f2d69
Pipeline #49273419 passed with stages
in 7 minutes and 10 seconds
......@@ -910,7 +910,7 @@ let disconnect { global_db = { p2p } } peer_id =
| None -> Lwt.return_unit
| Some conn -> P2p.disconnect p2p conn
let shutdown { p2p ; p2p_readers ; active_chains } =
let shutdown { p2p_readers ; active_chains } =
P2p_peer.Table.fold
(fun _peer_id reader acc ->
P2p_reader.shutdown reader >>= fun () -> acc)
......@@ -923,7 +923,6 @@ let shutdown { p2p ; p2p_readers ; active_chains } =
acc)
active_chains
Lwt.return_unit >>= fun () ->
P2p.shutdown p2p >>= fun () ->
Lwt.return_unit
let clear_block chain_db hash n =
......
......@@ -205,6 +205,7 @@ let create
?max_child_ttl ~start_prevalidator mainchain_state >>=? fun mainchain_validator ->
let shutdown () =
P2p.shutdown p2p >>= fun () ->
Distributed_db.shutdown distributed_db >>= fun () ->
Validator.shutdown validator >>= fun () ->
State.close state >>= fun () ->
Lwt.return_unit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment