Browse Source
Check Equihash solution when loading block index
pull/4/head
Jack Grigg
6 years ago
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
1 changed files with
3 additions and
0 deletions
-
src/txdb.cpp
|
|
@ -313,6 +313,9 @@ bool CBlockTreeDB::LoadBlockIndexGuts() |
|
|
|
pindexNew->nTx = diskindex.nTx; |
|
|
|
pindexNew->nSproutValue = diskindex.nSproutValue; |
|
|
|
|
|
|
|
auto header = pindexNew->GetBlockHeader(); |
|
|
|
if (!CheckEquihashSolution(&header, Params())) |
|
|
|
return error("LoadBlockIndex(): CheckEquihashSolution failed: %s", pindexNew->ToString()); |
|
|
|
if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits, Params().GetConsensus())) |
|
|
|
return error("LoadBlockIndex(): CheckProofOfWork failed: %s", pindexNew->ToString()); |
|
|
|
|
|
|
|