Compensate for processblock
This commit is contained in:
17
src/main.cpp
17
src/main.cpp
@@ -1615,14 +1615,17 @@ bool ReadBlockFromDisk(int32_t height,CBlock& block, const CDiskBlockPos& pos)
|
|||||||
return error("%s: Deserialize or I/O error - %s at %s", __func__, e.what(), pos.ToString());
|
return error("%s: Deserialize or I/O error - %s at %s", __func__, e.what(), pos.ToString());
|
||||||
}
|
}
|
||||||
// Check the header
|
// Check the header
|
||||||
komodo_block2pubkey33(pubkey33,(CBlock *)&block);
|
if ( 0 )
|
||||||
if (!(CheckEquihashSolution(&block, Params()) && CheckProofOfWork(height,pubkey33,block.GetHash(), block.nBits, Params().GetConsensus(),block.nTime)))
|
|
||||||
{
|
{
|
||||||
int32_t i; for (i=0; i<33; i++)
|
komodo_block2pubkey33(pubkey33,(CBlock *)&block);
|
||||||
fprintf(stderr,"%02x",pubkey33[i]);
|
if (!(CheckEquihashSolution(&block, Params()) && CheckProofOfWork(height,pubkey33,block.GetHash(), block.nBits, Params().GetConsensus(),block.nTime)))
|
||||||
fprintf(stderr," warning unexpected diff at ht.%d\n",height);
|
{
|
||||||
|
int32_t i; for (i=0; i<33; i++)
|
||||||
return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString());
|
fprintf(stderr,"%02x",pubkey33[i]);
|
||||||
|
fprintf(stderr," warning unexpected diff at ht.%d\n",height);
|
||||||
|
|
||||||
|
return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user