diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp index c6a021119..d91707cf9 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 9b5ac2ac2..1494c6dc2 100644 --- a/src/validationinterface.h +++ b/src/validationinterface.h @@ -45,7 +45,11 @@ void CallFunctionInValidationInterfaceQueue(std::function 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.