mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Only check 1 in 1000 block header sigs on load
This commit is contained in:
parent
87c06d4091
commit
0baa13581e
1 changed files with 3 additions and 1 deletions
|
|
@ -320,7 +320,9 @@ bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams,
|
|||
pindexNew->nTx = diskindex.nTx;
|
||||
|
||||
const uint256 block_hash = pindexNew->GetBlockHash();
|
||||
if (!CheckProof(pindexNew->GetBlockHeader(), consensusParams) &&
|
||||
// Only validate one of every 1000 block header for sanity check
|
||||
if (pindexNew->nHeight % 1000 == 0 &&
|
||||
!CheckProof(pindexNew->GetBlockHeader(), consensusParams) &&
|
||||
block_hash != consensusParams.hashGenesisBlock) {
|
||||
return error("%s: CheckProof: %s, %s", __func__, block_hash.ToString(), pindexNew->ToString());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue