Add helper to wait for validation interface queue to catch up
This commit is contained in:
@@ -1292,12 +1292,7 @@ void CWallet::BlockUntilSyncedToCurrentChain() {
|
||||
// ...otherwise put a callback in the validation interface queue and wait
|
||||
// for the queue to drain enough to execute it (indicating we are caught up
|
||||
// at least with the time we entered this function).
|
||||
|
||||
std::promise<void> promise;
|
||||
CallFunctionInValidationInterfaceQueue([&promise] {
|
||||
promise.set_value();
|
||||
});
|
||||
promise.get_future().wait();
|
||||
SyncWithValidationInterfaceQueue();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user