diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-01-23 07:37:39 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-01-23 07:43:47 +0100 |
commit | eafba4e273f0f86ac0641f072cb23b57fb776a83 (patch) | |
tree | d02262c1e2766924ebc19b48dc231a0c3c5f99cb | |
parent | ff58b1c3bdff5e5f687f10f9e40ce495ca49674e (diff) | |
parent | 989989354b68d3954fe2742b96c53eeb2e8a7670 (diff) |
Merge #9583: Move wallet callbacks into cs_main (this effectively reverts #7946)
9899893 Move wallet callbacks into cs_main (this effectively reverts #7946) (Matt Corallo)
-rw-r--r-- | src/validation.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index bb13cbaadb..6bc20edd04 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2473,20 +2473,19 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, pindexNewTip = chainActive.Tip(); pindexFork = chainActive.FindFork(pindexOldTip); fInitialDownload = IsInitialBlockDownload(); + + // throw all transactions though the signal-interface + for (const auto& pair : connectTrace.blocksConnected) { + assert(pair.second); + const CBlock& block = *(pair.second); + for (unsigned int i = 0; i < block.vtx.size(); i++) + GetMainSignals().SyncTransaction(*block.vtx[i], pair.first, i); + } } // When we reach this point, we switched to a new tip (stored in pindexNewTip). // Notifications/callbacks that can run without cs_main - // throw all transactions though the signal-interface - // while _not_ holding the cs_main lock - for (const auto& pair : connectTrace.blocksConnected) { - assert(pair.second); - const CBlock& block = *(pair.second); - for (unsigned int i = 0; i < block.vtx.size(); i++) - GetMainSignals().SyncTransaction(*block.vtx[i], pair.first, i); - } - // Notify external listeners about the new tip. GetMainSignals().UpdatedBlockTip(pindexNewTip, pindexFork, fInitialDownload); |