diff --git a/src/pow.cpp b/src/pow.cpp index cd5ae8636..458b3789c 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -194,7 +194,7 @@ arith_uint256 RT_CST_RST_target(int32_t height,uint32_t nTime,arith_uint256 bnTa bnTarget = ct[0]; for (i=1; i 2 ) - bnTarget = (bnTarget / arith_uint256(3)) * arith_uint256(2); - else if ( factor == 2 ) - bnTarget = (bnTarget / arith_uint256(4)) * arith_uint256(3); - if ( 1 && bnTarget > mintarget ) + bnTarget = RT_CST_RST_target(height,nTime,bnTarget,ts,ct,W); + if ( bnTarget > mintarget ) bnTarget = mintarget; - fprintf(stderr,"inner outeri.%d, width.%d %d vs %d, deficit %d factor.%d\n",outeri,width,(ts[0] - ts[width]),expected,expected - (ts[0] - ts[width]),factor); + { + int32_t z; + for (z=31; z>=0; z--) + fprintf(stderr,"%02x",((uint8_t *)&bnTarget)[z]); + } + fprintf(stderr," inner outeri.%d, width.%d %d vs %d, deficit %d factor.%d\n",outeri,width,(ts[0] - ts[width]),expected,expected - (ts[0] - ts[width]),factor); } return(bnTarget); }