|
@ -75,7 +75,7 @@ void stats_pairupdate(struct DEXstats_datenuminfo *date,char *symbol,char *dest, |
|
|
printf("date->datenum %d != %d? hour.%d seconds.%d\n",date->datenum,datenum,hour,seconds); |
|
|
printf("date->datenum %d != %d? hour.%d seconds.%d\n",date->datenum,datenum,hour,seconds); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
printf("%d numpairs.%d %p %p\n",date->datenum,date->numpairs,date,date->pairs); |
|
|
//printf("%d numpairs.%d %p %p\n",date->datenum,date->numpairs,date,date->pairs);
|
|
|
for (i=0; i<date->numpairs; i++) |
|
|
for (i=0; i<date->numpairs; i++) |
|
|
if ( strcmp(dest,date->pairs[i].dest) == 0 ) |
|
|
if ( strcmp(dest,date->pairs[i].dest) == 0 ) |
|
|
{ |
|
|
{ |
|
@ -744,11 +744,9 @@ void stats_dispprices(struct DEXstats_disp *prices,int32_t leftdatenum,int32_t n |
|
|
{ |
|
|
{ |
|
|
int32_t i,j,seconds,hour,offset,delta,datenum = date->datenum; struct DEXstats_pairinfo *pair; struct DEXstats_pricepoint *ptr; uint32_t timestamp; |
|
|
int32_t i,j,seconds,hour,offset,delta,datenum = date->datenum; struct DEXstats_pairinfo *pair; struct DEXstats_pricepoint *ptr; uint32_t timestamp; |
|
|
offset = datenum - leftdatenum; |
|
|
offset = datenum - leftdatenum; |
|
|
printf("add datenum.%d vs leftdatenum.%d numdates.%d offset.%d numpairs.%d\n",datenum,leftdatenum,numdates,offset,date->numpairs); |
|
|
printf("search dest.%s datenum.%d vs leftdatenum.%d numdates.%d offset.%d numpairs.%d\n",dest,datenum,leftdatenum,numdates,offset,date->numpairs); |
|
|
if ( datenum >= leftdatenum-1 && datenum <= leftdatenum+numdates ) |
|
|
|
|
|
{ |
|
|
|
|
|
printf("add datenum.%d vs leftdatenum.%d numdates.%d offset.%d numpairs.%d\n",datenum,leftdatenum,numdates,offset,date->numpairs); |
|
|
|
|
|
for (i=0; i<date->numpairs; i++) |
|
|
for (i=0; i<date->numpairs; i++) |
|
|
|
|
|
{ |
|
|
if ( strcmp(dest,date->pairs[i].dest) == 0 ) |
|
|
if ( strcmp(dest,date->pairs[i].dest) == 0 ) |
|
|
{ |
|
|
{ |
|
|
pair = &date->pairs[i]; |
|
|
pair = &date->pairs[i]; |
|
@ -766,7 +764,6 @@ void stats_dispprices(struct DEXstats_disp *prices,int32_t leftdatenum,int32_t n |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|