diff --git a/src/init.cpp b/src/init.cpp index bef8284eba5f..eb4a80e1abb8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -242,6 +242,11 @@ void PrepareShutdown() StopTorControl(); + // After everything has been shut down, but before things get flushed, stop the + // CScheduler/checkqueue threadGroup + threadGroup.interrupt_all(); + threadGroup.join_all(); + DumpMasternodes(); DumpBudgets(g_budgetman); DumpMasternodePayments(); @@ -250,11 +255,6 @@ void PrepareShutdown() DumpMempool(); } - // After everything has been shut down, but before things get flushed, stop the - // CScheduler/checkqueue threadGroup - threadGroup.interrupt_all(); - threadGroup.join_all(); - if (fFeeEstimatesInitialized) { fs::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME; CAutoFile est_fileout(fsbridge::fopen(est_path, "wb"), SER_DISK, CLIENT_VERSION);