From 67eaffd906da86472608638db736869d05d5d0b1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 19 Apr 2018 17:58:27 +0300 Subject: [PATCH] Test --- src/komodo_bitcoind.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index b22e3fa56..40a3e5231 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -1141,7 +1141,7 @@ uint32_t komodo_stake(int32_t validateflag,arith_uint256 bnTarget,int32_t nHeigh arith_uint256 komodo_PoWtarget(int32_t *percPoSp,arith_uint256 target,int32_t height,int32_t goalperc) { - CBlockIndex *pindex; arith_uint256 bnTarget,hashval,sum,ave,factor; bool fNegative,fOverflow; int32_t i,n,ht,percPoS,diff; + CBlockIndex *pindex; arith_uint256 bnTarget,hashval,sum,ave; bool fNegative,fOverflow; int32_t i,n,ht,percPoS,diff; *percPoSp = percPoS = 0; sum = arith_uint256(0); ave = sum; @@ -1171,10 +1171,7 @@ arith_uint256 komodo_PoWtarget(int32_t *percPoSp,arith_uint256 target,int32_t he if ( percPoS < goalperc ) // increase PoW diff -> lower bnTarget { if ( height > 1165 ) - { - factor = arith_uint256(goalperc * goalperc) / arith_uint256(2 * (percPoS + goalperc) * (percPoS + goalperc)); - bnTarget = (ave * factor); - } + bnTarget = (ave * arith_uint256(goalperc * goalperc)) / arith_uint256(2 * (percPoS + goalperc) * (percPoS + goalperc)); else bnTarget = (ave * arith_uint256(goalperc)) / arith_uint256(percPoS + goalperc); if ( 1 ) {