Deprecate prices_extract
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#define CC_PRICES_H
|
||||
|
||||
#include "CCinclude.h"
|
||||
int32_t prices_extract(int64_t *pricedata,int32_t firstheight,int32_t numblocks,int32_t ind);
|
||||
int32_t komodo_priceget(int64_t *buf64,int32_t ind,int32_t height,int32_t numblocks);
|
||||
|
||||
#define PRICES_DAYWINDOW ((3600*24/ASSETCHAINS_BLOCKTIME) + 1)
|
||||
|
||||
@@ -320,8 +320,7 @@ int32_t prices_syntheticvec(std::vector<uint16_t> &vec,std::vector<std::string>
|
||||
|
||||
int64_t prices_syntheticprice(std::vector<uint16_t> vec,int32_t height,int32_t minmax,int16_t leverage)
|
||||
{
|
||||
int32_t i,ind,errcode,depth,retval = -1; uint16_t opcode; int64_t *pricedata,pricestack[4],price,den,a,b,c;
|
||||
pricedata = (int64_t *)calloc(sizeof(*pricedata)*3,1 + PRICES_DAYWINDOW*2 + PRICES_SMOOTHWIDTH);
|
||||
int32_t i,ind,errcode,depth,retval = -1; uint16_t opcode; int64_t pricedata[PRICES_MAXDATAPOINTS],pricestack[4],price,den,a,b,c;
|
||||
price = den = depth = errcode = 0;
|
||||
for (i=0; i<vec.size(); i++)
|
||||
{
|
||||
@@ -331,7 +330,7 @@ int64_t prices_syntheticprice(std::vector<uint16_t> vec,int32_t height,int32_t m
|
||||
{
|
||||
case 0:
|
||||
pricestack[depth] = 0;
|
||||
if ( prices_extract(pricedata,height,1,ind) == 0 )
|
||||
if ( komodo_priceget(pricedata,ind,height,1) > 0 )
|
||||
{
|
||||
if ( minmax == 0 )
|
||||
pricestack[depth] = pricedata[2];
|
||||
@@ -420,7 +419,6 @@ int64_t prices_syntheticprice(std::vector<uint16_t> vec,int32_t height,int32_t m
|
||||
if ( errcode != 0 )
|
||||
break;
|
||||
}
|
||||
free(pricedata);
|
||||
if ( den == 0 )
|
||||
return(-11);
|
||||
else if ( depth != 0 )
|
||||
|
||||
@@ -1156,7 +1156,7 @@ UniValue paxprice(const UniValue& params, bool fHelp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int32_t prices_extract(int64_t *pricedata,int32_t firstheight,int32_t numblocks,int32_t ind)
|
||||
/*int32_t prices_extract(int64_t *pricedata,int32_t firstheight,int32_t numblocks,int32_t ind)
|
||||
{
|
||||
int32_t height,i,n,width,numpricefeeds = -1; uint64_t seed,ignore,rngval; uint32_t rawprices[1440*6],*ptr; int64_t *tmpbuf;
|
||||
width = numblocks+PRICES_DAYWINDOW*2+PRICES_SMOOTHWIDTH;
|
||||
@@ -1188,7 +1188,7 @@ int32_t prices_extract(int64_t *pricedata,int32_t firstheight,int32_t numblocks,
|
||||
pricedata[i*3+2] = komodo_priceave(tmpbuf,&pricedata[i*3+1],3);
|
||||
free(tmpbuf);
|
||||
return(0);
|
||||
}
|
||||
}*/
|
||||
|
||||
UniValue prices(const UniValue& params, bool fHelp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user