diff options
-rw-r--r-- | src/validationinterface.cpp | 4 | ||||
-rw-r--r-- | src/validationinterface.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp index c6a021119e..d91707cf9f 100644 --- a/src/validationinterface.cpp +++ b/src/validationinterface.cpp @@ -117,7 +117,9 @@ void CMainSignals::MempoolEntryRemoved(CTransactionRef ptx, MemPoolRemovalReason } void CMainSignals::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) { - m_internals->UpdatedBlockTip(pindexNew, pindexFork, fInitialDownload); + m_internals->m_schedulerClient.AddToProcessQueue([pindexNew, pindexFork, fInitialDownload, this] { + m_internals->UpdatedBlockTip(pindexNew, pindexFork, fInitialDownload); + }); } void CMainSignals::TransactionAddedToMempool(const CTransactionRef &ptx) { diff --git a/src/validationinterface.h b/src/validationinterface.h index 9b5ac2ac23..1494c6dc21 100644 --- a/src/validationinterface.h +++ b/src/validationinterface.h @@ -45,7 +45,11 @@ void CallFunctionInValidationInterfaceQueue(std::function<void ()> func); class CValidationInterface { protected: - /** Notifies listeners of updated block chain tip */ + /** + * Notifies listeners of updated block chain tip + * + * Called on a background thread. + */ virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) {} /** * Notifies listeners of a transaction having been added to mempool. |