Skip to content

Commit 1f470d3

Browse files
committed
ReadBlockFromDisk: do genesis block check before block proof check
1 parent cd5d87c commit 1f470d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/validation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,8 +1148,8 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus:
11481148

11491149
// Check the header
11501150
const uint256 block_hash = block.GetHash();
1151-
if (!CheckProof(block, consensusParams) &&
1152-
block_hash != consensusParams.hashGenesisBlock) {
1151+
if (block_hash != consensusParams.hashGenesisBlock &&
1152+
!CheckProof(block, consensusParams)) {
11531153
return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString());
11541154
}
11551155

0 commit comments

Comments
 (0)