From e3a910b8cbf3c181cc37e15f0a65f7df03511a17 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 2 Apr 2019 03:30:46 -1100 Subject: [PATCH] +print --- src/komodo_gateway.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 9bfc76835..d19325778 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -1807,7 +1807,7 @@ int32_t komodo_opretvalidate(const CBlock *block,CBlockIndex * const previndex,i for (j=0; j= prevbits[i] ) { - fprintf(stderr,"within recent localprices[%d] %u >= %u\n",j,PriceCache[j][i],prevbits[i]); + fprintf(stderr,"i.%d within recent localprices[%d] %u >= %u\n",i,j,PriceCache[j][i],prevbits[i]); continue; } break; @@ -1819,7 +1819,7 @@ int32_t komodo_opretvalidate(const CBlock *block,CBlockIndex * const previndex,i for (j=0; j 333 ) // for debug only! get_stocks(Techstocks,(int32_t)(sizeof(Techstocks)/sizeof(*Techstocks))); }*/ } + pending = 0; } char *komodo_pricename(char *name,int32_t ind) @@ -2242,8 +2250,8 @@ int64_t komodo_pricecorrelated(uint64_t seed,int32_t ind,uint32_t *rawprices,int sum = correlation = 0; i = (j + seed) % daywindow; refprice = rawprices[i] * (ind < 36 ? 10000 : 1); - highprice = ((int64_t)refprice * (COIN + PRICES_MAXCHANGE/2)) / COIN; - lowprice = ((int64_t)refprice * (COIN - PRICES_MAXCHANGE/2)) / COIN; + highprice = ((int64_t)refprice * (COIN + PRICES_MAXCHANGE/10)) / COIN; + lowprice = ((int64_t)refprice * (COIN - PRICES_MAXCHANGE/10)) / COIN; if ( highprice == refprice ) highprice++; if ( lowprice == refprice ) @@ -2260,7 +2268,7 @@ int64_t komodo_pricecorrelated(uint64_t seed,int32_t ind,uint32_t *rawprices,int correlation++; if ( correlation > (daywindow>>1) ) { - fprintf(stderr,"iter.%d j.%d i.%d correlation.%d ref %llu -> %llu\n",iter,j,i,correlation,(long long)refprice,(long long)sum/correlation); + fprintf(stderr,"ind.%d iter.%d j.%d i.%d correlation.%d ref %llu -> %llu\n",ind,iter,j,i,correlation,(long long)refprice,(long long)sum/correlation); return(sum / correlation); } }