Fix ERROR: CheckProofOfWork() : hash doesn't match nBits
ERROR: LoadBlockIndex() : CheckIndex failed at ***
filein >> *this;
// Check the header
- if (!CheckProofOfWork(GetHash(), nBits))
+ if (IsProofOfWork() && !CheckProofOfWork(GetHash(), nBits))
return error("CBlock::ReadFromDisk() : errors in block header");
return true;
bool CheckIndex() const
{
- return CheckProofOfWork(GetBlockHash(), nBits);
+ return IsProofOfWork() ? CheckProofOfWork(GetBlockHash(), nBits) : true;
}
bool EraseBlockFromDisk()