Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/decenomy/DSW into AZR-de…
Browse files Browse the repository at this point in the history
…velop
  • Loading branch information
pedro-at-decenomy committed Aug 2, 2021
2 parents 51ad154 + 92f6728 commit 7bbf56b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/txdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts(boost::function<CBlockIndex*(const uint256
CDiskBlockIndex diskindex;
if (pcursor->GetValue(diskindex)) {
// Construct block index object
CBlockIndex* pindexNew = insertBlockIndex(diskindex.GetBlockHash());
CBlockIndex* pindexNew = insertBlockIndex(key.second); // use the hash already registered on the key index
pindexNew->pprev = insertBlockIndex(diskindex.hashPrev);
pindexNew->nHeight = diskindex.nHeight;
pindexNew->nFile = diskindex.nFile;
Expand All @@ -288,10 +288,10 @@ bool CBlockTreeDB::LoadBlockIndexGuts(boost::function<CBlockIndex*(const uint256
pindexNew->nFlags = diskindex.nFlags;
pindexNew->vStakeModifier = diskindex.vStakeModifier;

if (!Params().GetConsensus().NetworkUpgradeActive(pindexNew->nHeight, Consensus::UPGRADE_POS)) {
if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits))
return error("LoadBlockIndex() : CheckProofOfWork failed: %s", pindexNew->ToString());
}
// if (!Params().GetConsensus().NetworkUpgradeActive(pindexNew->nHeight, Consensus::UPGRADE_POS)) {
// if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits))
// return error("LoadBlockIndex() : CheckProofOfWork failed: %s", pindexNew->ToString());
// }

pcursor->Next();
} else {
Expand Down

0 comments on commit 7bbf56b

Please sign in to comment.