aboutsummaryrefslogtreecommitdiff
path: root/src/validationinterface.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2018-04-17 16:00:44 +0200
committerWladimir J. van der Laan <[email protected]>2018-04-17 16:01:12 +0200
commit39e0c65b29eb2ba1e9bb29a38df59e8bc2b83585 (patch)
tree25f393c33285ba90994a066d7adf237e6ad32296 /src/validationinterface.cpp
parentMerge #12977: Refactor g_wallet_init_interface to const reference (diff)
parentHold cs_main while calling UpdatedBlockTip() and ui.NotifyBlockTip (diff)
downloaddiscoin-39e0c65b29eb2ba1e9bb29a38df59e8bc2b83585.tar.xz
discoin-39e0c65b29eb2ba1e9bb29a38df59e8bc2b83585.zip
Merge #12988: Hold cs_main while calling UpdatedBlockTip() signal
d86edd3 Hold cs_main while calling UpdatedBlockTip() and ui.NotifyBlockTip (Jesse Cohen) Pull request description: Resolves #12978 Tree-SHA512: 2aed09434cd8dbf541ea75462070b73ee87ff31409bede210f6999ffee4a37e32202a289efd37609485d4cbdfe134fe4660a10bfb41e8a8acdba7cd0b61b8780
Diffstat (limited to 'src/validationinterface.cpp')
-rw-r--r--src/validationinterface.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp
index 928df4fa6..746263f11 100644
--- a/src/validationinterface.cpp
+++ b/src/validationinterface.cpp
@@ -139,6 +139,10 @@ void CMainSignals::MempoolEntryRemoved(CTransactionRef ptx, MemPoolRemovalReason
}
void CMainSignals::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) {
+ // Dependencies exist that require UpdatedBlockTip events to be delivered in the order in which
+ // the chain actually updates. One way to ensure this is for the caller to invoke this signal
+ // in the same critical section where the chain is updated
+
m_internals->m_schedulerClient.AddToProcessQueue([pindexNew, pindexFork, fInitialDownload, this] {
m_internals->UpdatedBlockTip(pindexNew, pindexFork, fInitialDownload);
});