Skip to content

Commit bc03fe9

Browse files
CodeSharksipa
authored andcommitted
Genesis block disk query fix
1 parent 29d17a0 commit bc03fe9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,8 +1373,9 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus:
13731373
}
13741374

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

13791380
return true;
13801381
}

0 commit comments

Comments
 (0)