mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Dynafed RPC support, tests, and deployment for custom chains
This commit is contained in:
parent
aac354b5ba
commit
47db75e39f
15 changed files with 849 additions and 342 deletions
|
|
@ -318,12 +318,14 @@ bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams,
|
|||
pindexNew->proof = diskindex.proof;
|
||||
pindexNew->nStatus = diskindex.nStatus;
|
||||
pindexNew->nTx = diskindex.nTx;
|
||||
pindexNew->d_params = diskindex.d_params;
|
||||
pindexNew->m_signblock_witness = diskindex.m_signblock_witness;
|
||||
|
||||
const uint256 block_hash = pindexNew->GetBlockHash();
|
||||
// Only validate one of every 1000 block header for sanity check
|
||||
if (pindexNew->nHeight % 1000 == 0 &&
|
||||
!CheckProof(pindexNew->GetBlockHeader(), consensusParams) &&
|
||||
block_hash != consensusParams.hashGenesisBlock) {
|
||||
block_hash != consensusParams.hashGenesisBlock &&
|
||||
!CheckProof(pindexNew->GetBlockHeader(), consensusParams)) {
|
||||
return error("%s: CheckProof: %s, %s", __func__, block_hash.ToString(), pindexNew->ToString());
|
||||
}
|
||||
pcursor->Next();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue