From e4b3ad624a077378798d2c5aa5cc2ff89a030790 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 8 Feb 2017 09:54:00 +0200 Subject: [PATCH] test --- src/main.cpp | 6 ++++++ src/pow.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 679524628..c834b24cc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1435,7 +1435,13 @@ bool ReadBlockFromDisk(int32_t height,CBlock& block, const CDiskBlockPos& pos) // Check the header komodo_block2pubkey33(pubkey33,block); if (!(CheckEquihashSolution(&block, Params()) && CheckProofOfWork(height,pubkey33,block.GetHash(), block.nBits, Params().GetConsensus()))) + { + for (i=0; i<33; i++) + printf("%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; } diff --git a/src/pow.cpp b/src/pow.cpp index 3cf53f9d7..c48a59919 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -167,7 +167,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in // Check proof of work matches claimed amount if ( UintToArith256(hash) > bnTarget ) { - if ( KOMODO_LOADINGBLOCKS == 0 && height > 186269 && KOMODO_REWIND == 0 )//182507&& komodo_chainactive(height) != 0 && nonzpkeys > 0 + if ( KOMODO_LOADINGBLOCKS == 0 && height > 188000 && KOMODO_REWIND == 0 )//186269, 182507&& komodo_chainactive(height) != 0 && nonzpkeys > 0 { int32_t i; for (i=31; i>=0; i--)