mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
ReadBlockFromDisk: do genesis block check before block proof check
This commit is contained in:
parent
6f0d9244f6
commit
0a8565bbf8
1 changed files with 2 additions and 2 deletions
|
|
@ -1148,8 +1148,8 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus:
|
||||||
|
|
||||||
// Check the header
|
// Check the header
|
||||||
const uint256 block_hash = block.GetHash();
|
const uint256 block_hash = block.GetHash();
|
||||||
if (!CheckProof(block, consensusParams) &&
|
if (block_hash != consensusParams.hashGenesisBlock &&
|
||||||
block_hash != consensusParams.hashGenesisBlock) {
|
!CheckProof(block, consensusParams)) {
|
||||||
return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString());
|
return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue