cast
This commit is contained in:
@@ -2235,8 +2235,8 @@ int64_t komodo_pricecorrelated(uint32_t *rawprices,int32_t numprices)
|
||||
{
|
||||
if ( (price= rawprices[i]) == 0 )
|
||||
return(0);
|
||||
fprintf(stderr,"%.4f ",(double)price/10000);
|
||||
sum += price * 10000;
|
||||
fprintf(stderr,"%.0f ",(double)price/10000);
|
||||
sum += (int64_t)price * 10000;
|
||||
}
|
||||
fprintf(stderr," ave %.8f [%d]\n",((double)sum/numprices)/COIN,numprices);
|
||||
return(sum / numprices);
|
||||
|
||||
@@ -1216,11 +1216,7 @@ UniValue prices(const UniValue& params, bool fHelp)
|
||||
else
|
||||
{
|
||||
for (j=0; j<numpricefeeds; 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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user