Flush callbacks one more time at shutdown (#3963)

This is needed to be able to process SetBestChain callback generated by the first FlushStateToDisk call in PrepareShutdown

Partially reverts #3378
This commit is contained in:
UdjinM6 2021-01-25 07:56:18 +03:00 committed by GitHub
parent 48bf736525
commit a328756396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -307,6 +307,10 @@ 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