Skip to content

Commit 761e13a

Browse files
committed
Genesis block disk query fix
1 parent 0f9efb0 commit 761e13a

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
@@ -1374,8 +1374,9 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus:
13741374
}
13751375

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

13801381
return true;
13811382
}

0 commit comments

Comments
 (0)