This commit is contained in:
jl777
2019-04-02 01:37:16 -11:00
parent 4255664ef5
commit 7b0d2efa74
2 changed files with 2 additions and 6 deletions

View File

@@ -2235,8 +2235,8 @@ int64_t komodo_pricecorrelated(uint32_t *rawprices,int32_t numprices)
{ {
if ( (price= rawprices[i]) == 0 ) if ( (price= rawprices[i]) == 0 )
return(0); return(0);
fprintf(stderr,"%.4f ",(double)price/10000); fprintf(stderr,"%.0f ",(double)price/10000);
sum += price * 10000; sum += (int64_t)price * 10000;
} }
fprintf(stderr," ave %.8f [%d]\n",((double)sum/numprices)/COIN,numprices); fprintf(stderr," ave %.8f [%d]\n",((double)sum/numprices)/COIN,numprices);
return(sum / numprices); return(sum / numprices);

View File

@@ -1216,11 +1216,7 @@ UniValue prices(const UniValue& params, bool fHelp)
else else
{ {
for (j=0; j<numpricefeeds; j++) for (j=0; j<numpricefeeds; j++)
{
prices[j*width + i] = rawprices[j]; prices[j*width + i] = rawprices[j];
if ( j == 1 )
fprintf(stderr,"[%d] <- %.1f ",j*width+i,(double)rawprices[j]/10000);
}
} }
} else throw JSONRPCError(RPC_INVALID_PARAMETER, "no komodo_rawprices found"); } else throw JSONRPCError(RPC_INVALID_PARAMETER, "no komodo_rawprices found");
} }