Undo W-1
This commit is contained in:
@@ -102,11 +102,13 @@ arith_uint256 RT_CST_RST(int32_t height,uint32_t nTime,arith_uint256 bnTarget,ui
|
|||||||
int64_t altK; int32_t i,j,ii=0; // K is a scaling factor for integer divisions
|
int64_t altK; int32_t i,j,ii=0; // K is a scaling factor for integer divisions
|
||||||
if ( height < 64 )
|
if ( height < 64 )
|
||||||
return(bnTarget);
|
return(bnTarget);
|
||||||
if ( ((ts[0]-ts[W]) * W * 100)/(W-1) < (T * numerator * 100)/denominator )
|
//if ( ((ts[0]-ts[W]) * W * 100)/(W-1) < (T * numerator * 100)/denominator )
|
||||||
|
if ( (ts[0] - ts[W]) < (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]-ct[1])/K) * max(K,(K*(nTime-ts[0])*(ts[0]-ts[W])*denominator/numerator)/T/T);
|
||||||
bnTarget = ct[0] / arith_uint256(K);
|
bnTarget = ct[0] / arith_uint256(K);
|
||||||
altK = (K * (nTime-ts[0]) * (ts[0]-ts[W]) * denominator * W) / (numerator * (W-1) * (T * T));
|
//altK = (K * (nTime-ts[0]) * (ts[0]-ts[W]) * denominator * W) / (numerator * (W-1) * (T * T));
|
||||||
|
altK = (K * (nTime-ts[0]) * (ts[0]-ts[W]) * denominator) / (numerator * (T * T));
|
||||||
fprintf(stderr,"ht.%d initial altK.%lld %d * %d * %d / %d\n",height,(long long)altK,(nTime-ts[0]),(ts[0]-ts[W]),denominator,numerator);
|
fprintf(stderr,"ht.%d initial altK.%lld %d * %d * %d / %d\n",height,(long long)altK,(nTime-ts[0]),(ts[0]-ts[W]),denominator,numerator);
|
||||||
if ( altK > K )
|
if ( altK > K )
|
||||||
altK = K;
|
altK = K;
|
||||||
|
|||||||
Reference in New Issue
Block a user