Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ void PrepareShutdown()
threadGroup.interrupt_all();
threadGroup.join_all();

// After there are no more peers/RPC left to give us new data which may generate
// CValidationInterface callbacks, flush them...
GetMainSignals().FlushBackgroundCallbacks();

if (!fLiteMode && !fRPCInWarmup) {
// STORE DATA CACHES INTO SERIALIZED DAT FILES
CFlatDB<CMasternodeMetaMan> flatdb1("mncache.dat", "magicMasternodeCache");
Expand Down Expand Up @@ -293,10 +297,6 @@ void PrepareShutdown()
FlushStateToDisk();
}

// After there are no more peers/RPC left to give us new data which may generate
// CValidationInterface callbacks, flush them...
GetMainSignals().FlushBackgroundCallbacks();

// Any future callbacks will be dropped. This should absolutely be safe - if
// missing a callback results in an unrecoverable situation, unclean shutdown
// would too. The only reason to do the above flushes is to let the wallet catch
Expand Down