Skip to content

Commit 9759af1

Browse files
committed
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.
1 parent 44b05bf commit 9759af1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,11 +341,11 @@ void Shutdown(NodeContext& node)
341341
node.chain_clients.clear();
342342
UnregisterAllValidationInterfaces();
343343
GetMainSignals().UnregisterBackgroundSignalScheduler();
344-
node.kernel.reset();
345344
node.mempool.reset();
346345
node.fee_estimator.reset();
347346
node.chainman.reset();
348347
node.scheduler.reset();
348+
node.kernel.reset();
349349

350350
try {
351351
if (!fs::remove(GetPidFile(*node.args))) {

0 commit comments

Comments
 (0)