diff options
author | Matt Corallo <git@bluematt.me> | 2017-06-08 11:13:46 -0400 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2017-10-13 19:29:54 -0400 |
commit | 0b2f42d7376c5f7c1ba1ac5d17a30691989d9159 (patch) | |
tree | 435de24bb4a2795e44c547bc4829dd1f9ddde1df /src/validationinterface.cpp | |
parent | 2b4b34503ff0ed44365d83a68ffed2736ea9cc51 (diff) |
Add CallFunctionInQueue to wait on validation interface queue drain
Diffstat (limited to 'src/validationinterface.cpp')
-rw-r--r-- | src/validationinterface.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp index b4efbe6ef3..f2b35d5627 100644 --- a/src/validationinterface.cpp +++ b/src/validationinterface.cpp @@ -104,6 +104,10 @@ void UnregisterAllValidationInterfaces() { g_signals.m_internals->NewPoWValidBlock.disconnect_all_slots(); } +void CallFunctionInValidationInterfaceQueue(std::function<void ()> func) { + g_signals.m_internals->m_schedulerClient.AddToProcessQueue(std::move(func)); +} + void CMainSignals::MempoolEntryRemoved(CTransactionRef ptx, MemPoolRemovalReason reason) { if (reason != MemPoolRemovalReason::BLOCK && reason != MemPoolRemovalReason::CONFLICT) { m_internals->m_schedulerClient.AddToProcessQueue([ptx, this] { |