Browse Source

Fix

z_createrawtransaction
jl777 5 years ago
parent
commit
a18d49991b
  1. 4
      src/komodo_gateway.h
  2. 4
      src/rpc/blockchain.cpp

4
src/komodo_gateway.h

@ -2235,9 +2235,9 @@ int64_t komodo_pricecorrelated(uint32_t *rawprices,int32_t numprices)
{
if ( (price= rawprices[i]) == 0 )
return(0);
fprintf(stderr,"%.0f ",(double)price/10000);
//fprintf(stderr,"%.0f ",(double)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);
}

4
src/rpc/blockchain.cpp

@ -1229,7 +1229,7 @@ UniValue prices(const UniValue& params, bool fHelp)
ret.push_back(Pair("timestamps",timestamps));
ret.push_back(Pair("firstheight", (int64_t)nextheight-1-i));
}
for (j=1; j<2; j++)
for (j=1; j<numpricefeeds; j++)
{
UniValue item(UniValue::VOBJ),p(UniValue::VARR);
if ( (str= komodo_pricename(name,j)) != 0 )
@ -1245,7 +1245,7 @@ UniValue prices(const UniValue& params, bool fHelp)
offset = j*width + i;
smoothed = komodo_pricesmoothed(&correlated[i],daywindow);
UniValue parr(UniValue::VARR);
parr.push_back(ValueFromAmount(prices[offset]*10000));
parr.push_back(ValueFromAmount((int64_t)prices[offset]*10000));
parr.push_back(ValueFromAmount(correlated[i]));
parr.push_back(ValueFromAmount(smoothed));
p.push_back(parr);

Loading…
Cancel
Save