|
|
@ -2473,19 +2473,18 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, |
|
|
|
pindexNewTip = chainActive.Tip(); |
|
|
|
pindexNewTip = chainActive.Tip(); |
|
|
|
pindexFork = chainActive.FindFork(pindexOldTip); |
|
|
|
pindexFork = chainActive.FindFork(pindexOldTip); |
|
|
|
fInitialDownload = IsInitialBlockDownload(); |
|
|
|
fInitialDownload = IsInitialBlockDownload(); |
|
|
|
} |
|
|
|
|
|
|
|
// 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
|
|
|
|
// throw all transactions though the signal-interface
|
|
|
|
// while _not_ holding the cs_main lock
|
|
|
|
|
|
|
|
for (const auto& pair : connectTrace.blocksConnected) { |
|
|
|
for (const auto& pair : connectTrace.blocksConnected) { |
|
|
|
assert(pair.second); |
|
|
|
assert(pair.second); |
|
|
|
const CBlock& block = *(pair.second); |
|
|
|
const CBlock& block = *(pair.second); |
|
|
|
for (unsigned int i = 0; i < block.vtx.size(); i++) |
|
|
|
for (unsigned int i = 0; i < block.vtx.size(); i++) |
|
|
|
GetMainSignals().SyncTransaction(*block.vtx[i], pair.first, 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
|
|
|
|
|
|
|
|
|
|
|
|
// Notify external listeners about the new tip.
|
|
|
|
// Notify external listeners about the new tip.
|
|
|
|
GetMainSignals().UpdatedBlockTip(pindexNewTip, pindexFork, fInitialDownload); |
|
|
|
GetMainSignals().UpdatedBlockTip(pindexNewTip, pindexFork, fInitialDownload); |
|
|
|