Skip to content

Commit

Permalink
Genesis block disk query fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeShark committed Jan 14, 2016
1 parent 0f9efb0 commit 761e13a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1374,8 +1374,9 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus:
}

// Check the header
if (!CheckProofOfWork(block.GetHash(), block.nBits, consensusParams))
return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString());
if (consensusParams.hashGenesisBlock != block.GetHash() &&
!CheckProofOfWork(block.GetHash(), block.nBits, consensusParams))
return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString());

return true;
}
Expand Down

0 comments on commit 761e13a

Please sign in to comment.