From 129aa1345ade02decd228d96e2020eb5d8234864 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 19 Apr 2018 23:57:39 +0300 Subject: [PATCH] Compensate for processblock --- src/main.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 8d09ffcb6..f4a7eed43 100644 --- a/src/main.cpp +++ b/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()); } // 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; }