From 97d2b09c124e6e5803f7fd4503348d9710d1260f Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 24 Dec 2017 12:13:13 -0500 Subject: Add helper to wait for validation interface queue to catch up --- src/validation.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/validation.cpp') 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 promise; - CallFunctionInValidationInterfaceQueue([&promise] { - promise.set_value(); - }); - promise.get_future().wait(); + SyncWithValidationInterfaceQueue(); } if (ShutdownRequested()) -- cgit v1.2.3