From 9759af17ff7c28eb909cb73f62b78c90851ab74d Mon Sep 17 00:00:00 2001 From: TheCharlatan Date: Tue, 24 Oct 2023 08:37:12 +0200 Subject: [PATCH] shutdown: Destroy kernel last Currently the shutdown function resets the kernel before the chainman and scheduler. Invert this order by resetting the kernel last, since they might rely on the kernel. --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index c11f100139d..365e0e83b59 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -341,11 +341,11 @@ void Shutdown(NodeContext& node) node.chain_clients.clear(); UnregisterAllValidationInterfaces(); GetMainSignals().UnregisterBackgroundSignalScheduler(); - node.kernel.reset(); node.mempool.reset(); node.fee_estimator.reset(); node.chainman.reset(); node.scheduler.reset(); + node.kernel.reset(); try { if (!fs::remove(GetPidFile(*node.args))) {