From c09e3fa1a7873504b2bcc561733e41fcc30b7115 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 11 Apr 2018 04:48:32 +0300 Subject: [PATCH] Test --- src/komodo_gateway.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index d89936c37..778be3eca 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -690,8 +690,8 @@ uint32_t komodo_stake(arith_uint256 bnTarget,int32_t nHeight,uint256 txid,int32_ vcalc_sha256(0,(uint8_t *)&hash,hashbuf,(int32_t)sizeof(uint256)*2); //fprintf(stderr,"(%s) vs. (%s) %s %.8f txtime.%u\n",address,destaddr,hash.ToString().c_str(),dstr(value),txtime); diff = (blocktime - txtime - minage); - //if ( diff > 3600 ) - // diff = 3600; + if ( diff > 3600*24 ) + diff = 3600*24; //coinage = (((value * diff) / supply) * diff); coinage = (value * diff) * ((diff >> 16) + 1); //hashval = arith_uint256(supply * 64) * (UintToArith256(hash) / arith_uint256(coinage+1)); @@ -706,8 +706,8 @@ uint32_t komodo_stake(arith_uint256 bnTarget,int32_t nHeight,uint256 txid,int32_ for (iter=1; iter<3600; iter++) { diff = (iter + blocktime - txtime - minage); - //if ( diff > 3600 ) - // break; + if ( diff > 3600*24 ) + break; coinage = (((value * diff) / supply) * diff); hashval = arith_uint256(supply * 64) * (UintToArith256(hash) / arith_uint256(coinage+1)); if ( hashval <= bnTarget )