From 62ec3eb4797ee0ef5667a8323f6733656e31c7ee Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 5 Aug 2019 05:34:41 -1100 Subject: [PATCH] #define K --- src/pow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index a5744cb30..628d7627c 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -93,12 +93,13 @@ bnTarget = RT_CST_RST (bnTarget, ts, cw, numerator, denominator, W, T, past); */ #define T ASSETCHAINS_BLOCKTIME +#define K 1000000 arith_uint256 RT_CST_RST(uint32_t nTime,arith_uint256 bnTarget,uint32_t *ts,arith_uint256 *ct,int32_t numerator,int32_t denominator,int32_t W,int32_t past) { //if (ts.size() < 2*W || ct.size() < 2*W ) { exit; } // error. a vector was too small //if (ts.size() < past+W || ct.size() < past+W ) { past = min(ct.size(), ts.size()) - W; } // past was too small, adjust - int32_t altK,K = 1000000,i,j,ii=0; // K is a scaling factor for integer divisions + int32_t altK,i,j,ii=0; // K is a scaling factor for integer divisions if ( ts[W+past] == 0 ) return(bnTarget); if ( ts[1]-ts[W] < T*numerator/denominator )