From 24ff9d6e54b281a2ce558f51ad7f3bc4218f16ea Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 2 Apr 2019 03:46:40 -1100 Subject: [PATCH] if ( n != correlation ) return(-1); --- src/komodo_gateway.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 3dc5b1bd8..9254980b2 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -2250,8 +2250,8 @@ int64_t komodo_pricecorrelated(uint64_t seed,int32_t ind,uint32_t *rawprices,int correlation = 0; i = (j + seed) % daywindow; refprice = rawprices[i] * (ind < 36 ? 10000 : 1); - highprice = ((int64_t)refprice * (COIN + PRICES_MAXCHANGE)) / COIN; - lowprice = ((int64_t)refprice * (COIN - PRICES_MAXCHANGE)) / COIN; + highprice = ((int64_t)refprice * (COIN + 10*PRICES_MAXCHANGE)) / COIN; + lowprice = ((int64_t)refprice * (COIN - 10*PRICES_MAXCHANGE)) / COIN; if ( highprice == refprice ) highprice++; if ( lowprice == refprice ) @@ -2306,6 +2306,6 @@ int64_t komodo_pricecorrelated(uint64_t seed,int32_t ind,uint32_t *rawprices,int if ( correlation > maxcorrelation ) maxcorrelation = correlation; } - fprintf(stderr,"ind.%d iter.%d maxcorrelation.%d\n",ind,itermaxcorrelation); + fprintf(stderr,"ind.%d iter.%d maxcorrelation.%d\n",ind,iter,maxcorrelation); return(0); }