diff options
author | Matt Corallo <git@bluematt.me> | 2017-12-24 12:13:13 -0500 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2017-12-26 11:56:00 -0500 |
commit | 97d2b09c124e6e5803f7fd4503348d9710d1260f (patch) | |
tree | 03f9de627168be7e5ae8a95b6d345b754496a517 /src/validation.cpp | |
parent | 36137497f1e2b3324ca84550f4f295dcd605d1fa (diff) |
Add helper to wait for validation interface queue to catch up
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 23ce6509d5..1c024ce2ae 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2572,11 +2572,7 @@ bool CChainState::ActivateBestChain(CValidationState &state, const CChainParams& // Block until the validation queue drains. This should largely // never happen in normal operation, however may happen during // reindex, causing memory blowup if we run too far ahead. - std::promise<void> promise; - CallFunctionInValidationInterfaceQueue([&promise] { - promise.set_value(); - }); - promise.get_future().wait(); + SyncWithValidationInterfaceQueue(); } if (ShutdownRequested()) |