Test
This commit is contained in:
@@ -4393,10 +4393,10 @@ CBlockIndex * InsertBlockIndex(uint256 hash)
|
|||||||
bool static LoadBlockIndexDB()
|
bool static LoadBlockIndexDB()
|
||||||
{
|
{
|
||||||
const CChainParams& chainparams = Params();
|
const CChainParams& chainparams = Params();
|
||||||
fprintf(stderr,"load blockindexDB %u\n",(uint32_t)time(NULL));
|
//fprintf(stderr,"load blockindexDB %u\n",(uint32_t)time(NULL));
|
||||||
if (!pblocktree->LoadBlockIndexGuts())
|
if (!pblocktree->LoadBlockIndexGuts())
|
||||||
return false;
|
return false;
|
||||||
fprintf(stderr,"load blockindexDB guts %u\n",(uint32_t)time(NULL));
|
//fprintf(stderr,"load blockindexDB guts %u\n",(uint32_t)time(NULL));
|
||||||
boost::this_thread::interruption_point();
|
boost::this_thread::interruption_point();
|
||||||
|
|
||||||
// Calculate nChainWork
|
// Calculate nChainWork
|
||||||
|
|||||||
11
src/txdb.cpp
11
src/txdb.cpp
@@ -528,10 +528,13 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
|
|||||||
if (header.GetHash() != pindexNew->GetBlockHash())
|
if (header.GetHash() != pindexNew->GetBlockHash())
|
||||||
return error("LoadBlockIndex(): block header inconsistency detected: on-disk = %s, in-memory = %s",
|
return error("LoadBlockIndex(): block header inconsistency detected: on-disk = %s, in-memory = %s",
|
||||||
diskindex.ToString(), pindexNew->ToString());
|
diskindex.ToString(), pindexNew->ToString());
|
||||||
uint8_t pubkey33[33];
|
if ( 0 ) // POW will be checked before any block is connected
|
||||||
komodo_index2pubkey33(pubkey33,pindexNew,pindexNew->nHeight);
|
{
|
||||||
if (!CheckProofOfWork(pindexNew->nHeight,pubkey33,pindexNew->GetBlockHash(), pindexNew->nBits, Params().GetConsensus(),pindexNew->nTime))
|
uint8_t pubkey33[33];
|
||||||
return error("LoadBlockIndex(): CheckProofOfWork failed: %s", pindexNew->ToString());
|
komodo_index2pubkey33(pubkey33,pindexNew,pindexNew->nHeight);
|
||||||
|
if (!CheckProofOfWork(pindexNew->nHeight,pubkey33,pindexNew->GetBlockHash(), pindexNew->nBits, Params().GetConsensus(),pindexNew->nTime))
|
||||||
|
return error("LoadBlockIndex(): CheckProofOfWork failed: %s", pindexNew->ToString());
|
||||||
|
}
|
||||||
pcursor->Next();
|
pcursor->Next();
|
||||||
} else {
|
} else {
|
||||||
break; // if shutdown requested or finished loading block index
|
break; // if shutdown requested or finished loading block index
|
||||||
|
|||||||
Reference in New Issue
Block a user