From ff67b2413ef96ce7fc1589173eaed1d29a4528cc Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 11 Dec 2016 09:38:08 +0200 Subject: [PATCH] test --- src/pow.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index d597123bc..b96d29b9c 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -146,15 +146,17 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in // Check proof of work matches claimed amount if ( UintToArith256(hash) > bnTarget ) { - int32_t i; - for (i=31; i>=0; i--) - printf("%02x",((uint8_t *)&hash)[i]); - printf(" hash vs "); - for (i=31; i>=0; i--) - printf("%02x",((uint8_t *)&bnTarget)[i]); - printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); if ( (KOMODO_REWIND == 0 && height > 108000) || height <= KOMODO_REWIND ) + { + int32_t i; + for (i=31; i>=0; i--) + printf("%02x",((uint8_t *)&hash)[i]); + printf(" hash vs "); + for (i=31; i>=0; i--) + printf("%02x",((uint8_t *)&bnTarget)[i]); + printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); return error("CheckProofOfWork(): hash doesn't match nBits"); + } } return true; }