jl777 8 years ago
parent
commit
f8c7aa2813
  1. 8
      iguana/dpow/dpow_prices.c
  2. 2
      iguana/dpow/dpow_rpc.c
  3. 2
      iguana/iguana_notary.c

8
iguana/dpow/dpow_prices.c

@ -723,7 +723,7 @@ double PAX_calcspline(struct PAX_spline *spline,double *outputs,double *slopes,i
if ( (f[n]= splinevals[i]) != 0. && utc32[i] != 0 )
{
//printf("i%d.(%u %f) ",i,utc32[i],splinevals[i]);
printf("%f ",splinevals[i]);
//printf("%f ",splinevals[i]);
if ( n > 0 )
{
if ( (gaps[n-1]= utc32[i] - lastxval) < 0 )
@ -1329,7 +1329,7 @@ int32_t PAX_ecbprices(char *date,double *prices,int32_t year,int32_t month,int32
count += PAX_ecbparse(basenum == 0 ? date : tmpdate,prices,url,basenum);
if ( (basenum != 0 && strcmp(tmpdate,date) != 0) || (checkdate[0] != 0 && strcmp(checkdate,date) != 0) )
{
printf("date mismatch (%s) != (%s) or checkdate.(%s)\n",tmpdate,date,checkdate);
//printf("date mismatch (%s) != (%s) or checkdate.(%s)\n",tmpdate,date,checkdate);
return(-1);
}
}
@ -1378,7 +1378,7 @@ int32_t ecb_matrix(double basevals[MAX_CURRENCIES],double matrix[MAX_CURRENCIES]
loaded = 1;
fclose(fp);
}
} else printf("peggy_matrix error loading %d.%d.%d\n",year,month,day);
} //else printf("peggy_matrix error loading %d.%d.%d\n",year,month,day);
}
else
{
@ -1795,7 +1795,7 @@ void PAX_genecbsplines(struct PAX_data *dp)
prices[j][numsamples+1] = prices[j][numsamples-1] + diff;
diff += prices[j][numsamples-1] - PAX_splineval(&dp->splines[j],utc32[numsamples-1] - 16*3600,1);
prices[j][numsamples+2] = prices[j][numsamples-1] + diff;
printf("%s splineval %f vs %f %f %f\n",CURRENCIES[j],prices[j][numsamples-1],prices[j][numsamples],prices[j][numsamples+1],prices[j][numsamples+2]);
//printf("%s splineval %f vs %f %f %f\n",CURRENCIES[j],prices[j][numsamples-1],prices[j][numsamples],prices[j][numsamples+1],prices[j][numsamples+2]);
PAX_genspline(&dp->splines[j],j,CURRENCIES[j],utc32,prices[j],numsamples+3,prices[j]);
}
}

2
iguana/dpow/dpow_rpc.c

@ -292,7 +292,7 @@ int32_t dpow_getchaintip(struct supernet_info *myinfo,bits256 *blockhashp,uint32
{
for (i=0; i<n&&i<maxtx; i++)
txs[i] = jbits256i(array,i);
//if ( 0 && strcmp(coin->symbol,"USD") == 0 )
if ( 0 && strcmp(coin->symbol,"USD") == 0 )
printf("dpow_getchaintip %s ht.%d time.%u numtx.%d\n",coin->symbol,height,*blocktimep,n);
*numtxp = n;
}

2
iguana/iguana_notary.c

@ -162,7 +162,7 @@ void iguana_dPoWupdate(struct supernet_info *myinfo,struct dpow_info *dp)
{
if ( strcmp(dp->dest,"KMD") == 0 )
dp->SRCHEIGHT = dpow_issuer_iteration(dp,src,dp->SRCHEIGHT,&dp->SRCREALTIME);
//printf("%s %s height.%d vs last.%d\n",dp->symbol,bits256_str(str,blockhash),height,dp->last.blockhash.height);
char str[65]; printf("%s %s height.%d vs last.%d\n",dp->symbol,bits256_str(str,blockhash),height,dp->last.blockhash.height);
if ( height < dp->last.blockhash.height )
{
printf("iguana_dPoWupdate src.%s reorg detected %d vs %d approved.%d notarized.%d\n",dp->symbol,height,dp->last.blockhash.height,dp->approved[0].height,dp->notarized[0].height);

Loading…
Cancel
Save