From 94ed553cfdfcad6324a5e2b811bab8feb2b75d4d Mon Sep 17 00:00:00 2001 From: phm87 <31578435+phm87@users.noreply.github.com> Date: Sun, 25 Oct 2020 02:18:07 +0100 Subject: [PATCH] Update pow.cpp --- src/pow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index c9848edf94dc5..5e585d93d1064 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -85,7 +85,7 @@ arith_uint256 oldRT_CST_RST(int32_t height,uint32_t nTime,arith_uint256 bnTarget if ( height < 64 ) return(bnTarget); //if ( ((ts[0]-ts[W]) * W * 100)/(W-1) < (T * numerator * 100)/denominator ) - if ( (uint32_t)(ts[0] - ts[W]) < (T * numerator)/denominator ) + if ( (int32_t) (ts[0] - ts[W]) < (int32_t) (T * numerator)/denominator ) { //bnTarget = ((ct[0]-ct[1])/K) * max(K,(K*(nTime-ts[0])*(ts[0]-ts[W])*denominator/numerator)/T/T); bnTarget = ct[0] / arith_uint256(K); @@ -149,7 +149,7 @@ arith_uint256 oldRT_CST_RST(int32_t height,uint32_t nTime,arith_uint256 bnTarget arith_uint256 RT_CST_RST_outer(int32_t height,uint32_t nTime,arith_uint256 bnTarget,uint32_t *ts,arith_uint256 *ct,int32_t numerator,int32_t denominator,int32_t W,int32_t past) { int64_t outerK; arith_uint256 mintarget = bnTarget / arith_uint256(2); - if ( (ts[0] - ts[W]) < (T * numerator)/denominator ) + if ( (int32_t) (ts[0] - ts[W]) < (int32_t) (T * numerator)/denominator ) { outerK = (K * (nTime-ts[0]) * (ts[0]-ts[W]) * denominator) / (numerator * (T * T)); if ( outerK < K )