aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2023-10-24 08:37:12 +0200
committerTheCharlatan <seb.kung@gmail.com>2023-10-24 08:37:22 +0200
commit9759af17ff7c28eb909cb73f62b78c90851ab74d (patch)
tree3516d0804ac1d9c1d911aa84e4bdc6cb3fa1dcd2 /src/init.cpp
parent44b05bf3fef2468783dcebf651654fdd30717e7e (diff)
downloadbitcoin-9759af17ff7c28eb909cb73f62b78c90851ab74d.tar.xz
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.
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index c11f100139..365e0e83b5 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))) {