Browse Source

Test

etomic
jl777 8 years ago
parent
commit
82e758144c
  1. 2
      crypto777/iguana_utils.c
  2. 4
      iguana/exchanges/bittrex.c
  3. 4
      iguana/iguana_notary.c

2
crypto777/iguana_utils.c

@ -1279,7 +1279,7 @@ double get_theoretical(double *avebidp,double *aveaskp,double *highbidp,double *
weighted = weighted_orderbook(avebidp,aveaskp,highbidp,lowaskp,bittrex_orderbook(base,rel,25),1./(*CMC_averagep)); weighted = weighted_orderbook(avebidp,aveaskp,highbidp,lowaskp,bittrex_orderbook(base,rel,25),1./(*CMC_averagep));
if ( *CMC_averagep > SMALLVAL && weighted > SMALLVAL ) if ( *CMC_averagep > SMALLVAL && weighted > SMALLVAL )
theoretical = calc_theoretical(weighted,*CMC_averagep,changes); theoretical = calc_theoretical(weighted,*CMC_averagep,changes);
if ( 0 && counter++ < 100 ) if ( (0) && counter++ < 100 )
printf("HBLA.[%.8f %.8f] AVE.[%.8f %.8f] (%s) CMC %f %f %f %f\n",*highbidp,*lowaskp,*avebidp,*aveaskp,jprint(item,0),*CMC_averagep,changes[0],changes[1],changes[2]); printf("HBLA.[%.8f %.8f] AVE.[%.8f %.8f] (%s) CMC %f %f %f %f\n",*highbidp,*lowaskp,*avebidp,*aveaskp,jprint(item,0),*CMC_averagep,changes[0],changes[1],changes[2]);
free_json(cmcjson); free_json(cmcjson);
} }

4
iguana/exchanges/bittrex.c

@ -179,13 +179,13 @@ uint64_t TRADE(int32_t dotrade,char **retstrp,struct exchange_info *exchange,cha
uuidstr.buf[j++] = uuidstr.buf[i]; uuidstr.buf[j++] = uuidstr.buf[i];
uuidstr.buf[j] = 0; uuidstr.buf[j] = 0;
n = (int32_t)strlen(uuidstr.buf); n = (int32_t)strlen(uuidstr.buf);
printf("-> uuidstr.(%s).%d\n",uuidstr.buf,n); //printf("-> uuidstr.(%s).%d\n",uuidstr.buf,n);
decode_hex(databuf,n/2,uuidstr.buf); decode_hex(databuf,n/2,uuidstr.buf);
if ( n >= 16 ) if ( n >= 16 )
for (i=0; i<8; i++) for (i=0; i<8; i++)
databuf[i] ^= databuf[8 + i]; databuf[i] ^= databuf[8 + i];
memcpy(&txid,databuf,8); memcpy(&txid,databuf,8);
printf("-> %llx\n",(long long)txid); //printf("-> %llx\n",(long long)txid);
} }
free_json(json); free_json(json);
} }

4
iguana/iguana_notary.c

@ -865,7 +865,7 @@ TWO_STRINGS(dex,getbalance,symbol,address)
char url[512],*retstr; cJSON *retjson; uint64_t val; char url[512],*retstr; cJSON *retjson; uint64_t val;
if ( myinfo->DEXEXPLORER != 0 ) if ( myinfo->DEXEXPLORER != 0 )
{ {
printf("DEXEXPLORER\n"); //printf("DEXEXPLORER\n");
if ( symbol != 0 && address != 0 && (coin= iguana_coinfind(symbol)) != 0 && coin->DEXEXPLORER != 0 ) if ( symbol != 0 && address != 0 && (coin= iguana_coinfind(symbol)) != 0 && coin->DEXEXPLORER != 0 )
return(jprint(kmd_getbalance(myinfo,coin,address),1)); return(jprint(kmd_getbalance(myinfo,coin,address),1));
if ( coin != 0 ) if ( coin != 0 )
@ -910,7 +910,7 @@ TWO_STRINGS(dex,getbalance,symbol,address)
jdelete(retjson,"unconfirmed_received"); jdelete(retjson,"unconfirmed_received");
jaddnum(retjson,"unconfirmed_received",dstr(val)); jaddnum(retjson,"unconfirmed_received",dstr(val));
} }
printf("blocktrail.(%s) -> (%s)\n",retstr,jprint(retjson,0)); //printf("blocktrail.(%s) -> (%s)\n",retstr,jprint(retjson,0));
free(retstr); free(retstr);
retstr = jprint(retjson,1); retstr = jprint(retjson,1);
} }

Loading…
Cancel
Save