mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge 7110d455eb into merged_master (Bitcoin PR #12980)
This commit is contained in:
commit
96169f79e3
3 changed files with 3 additions and 0 deletions
|
|
@ -4156,6 +4156,7 @@ bool CChainState::LoadBlockIndex(const Consensus::Params& consensus_params, CBlo
|
|||
sort(vSortedByHeight.begin(), vSortedByHeight.end());
|
||||
for (const std::pair<int, CBlockIndex*>& item : vSortedByHeight)
|
||||
{
|
||||
if (ShutdownRequested()) return false;
|
||||
CBlockIndex* pindex = item.second;
|
||||
pindex->nChainWork = (pindex->pprev ? pindex->pprev->nChainWork : 0) + GetBlockProof(*pindex);
|
||||
pindex->nTimeMax = (pindex->pprev ? std::max(pindex->pprev->nTimeMax, pindex->nTime) : pindex->nTime);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue