mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +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
|
||||
const uint256 block_hash = block.GetHash();
|
||||
if (!CheckProof(block, consensusParams) &&
|
||||
block_hash != consensusParams.hashGenesisBlock) {
|
||||
if (block_hash != consensusParams.hashGenesisBlock &&
|
||||
!CheckProof(block, consensusParams)) {
|
||||
return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue