Skip to content

Commit

Permalink
Merge pull request KomodoPlatform#16 from jl777/master
Browse files Browse the repository at this point in the history
Compensate for processblock
  • Loading branch information
pbca26 authored Apr 20, 2018
2 parents 10d5104 + a8e2d83 commit c7b7afc
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
// Check the header
komodo_block2pubkey33(pubkey33,(CBlock *)&block);
if (!(CheckEquihashSolution(&block, Params()) && CheckProofOfWork(height,pubkey33,block.GetHash(), block.nBits, Params().GetConsensus(),block.nTime)))
if ( 0 )
{
int32_t i; for (i=0; i<33; i++)
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());
komodo_block2pubkey33(pubkey33,(CBlock *)&block);
if (!(CheckEquihashSolution(&block, Params()) && CheckProofOfWork(height,pubkey33,block.GetHash(), block.nBits, Params().GetConsensus(),block.nTime)))
{
int32_t i; for (i=0; i<33; i++)
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;
}
Expand Down

0 comments on commit c7b7afc

Please sign in to comment.