Test
This commit is contained in:
@@ -70,8 +70,8 @@ void WaitForShutdown(boost::thread_group* threadGroup)
|
||||
{
|
||||
int32_t i; bool fShutdown = ShutdownRequested();
|
||||
// Tell the main threads to shutdown.
|
||||
if ( ASSETCHAINS_CBOPRET != 0 )
|
||||
komodo_pricesinit();
|
||||
//if ( ASSETCHAINS_CBOPRET != 0 )
|
||||
// komodo_pricesinit();
|
||||
while (!fShutdown)
|
||||
{
|
||||
//fprintf(stderr,"call passport iteration\n");
|
||||
|
||||
@@ -2660,7 +2660,11 @@ int64_t komodo_priceave(int64_t *buf,int64_t *correlated,int32_t cskip)
|
||||
|
||||
void komodo_pricesinit()
|
||||
{
|
||||
static int32_t didinit;
|
||||
int32_t i,createflag = 0;
|
||||
if ( didinit != 0 )
|
||||
return;
|
||||
didinit = 1;
|
||||
boost::filesystem::path pricefname,pricesdir = GetDataDir() / "prices";
|
||||
fprintf(stderr,"pricesinit (%s)\n",pricesdir.string().c_str());
|
||||
if (!boost::filesystem::exists(pricesdir))
|
||||
@@ -2720,6 +2724,11 @@ void komodo_pricesupdate(int32_t height,CBlock *pblock)
|
||||
rngval = seed;
|
||||
for (ind=1; ind<numprices; ind++)
|
||||
{
|
||||
if ( PRICES[ind].fp == 0 )
|
||||
{
|
||||
fprintf(stderr,"PRICES[%d].fp is null\n",ind);
|
||||
continue;
|
||||
}
|
||||
offset = (width-1)*numprices + ind;
|
||||
rngval = (rngval*11109 + 13849);
|
||||
if ( (correlated= komodo_pricecorrelated(rngval,ind,&ptr32[offset],-numprices,0,PRICES_SMOOTHWIDTH)) > 0 )
|
||||
|
||||
@@ -2100,6 +2100,7 @@ void komodo_args(char *argv0)
|
||||
extralen += symbol.size();
|
||||
}
|
||||
}
|
||||
komodo_pricesinit();
|
||||
komodo_cbopretupdate(1); // will set Mineropret
|
||||
fprintf(stderr,"This blockchain uses data produced from CoinDesk Bitcoin Price Index\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user