From 402814d0d5dc1809fa5531ee5eabf1e2f17a672e Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 29 Sep 2016 13:03:15 -0300 Subject: [PATCH] test --- basilisk/basilisk_tradebot.c | 4 ++++ iguana/iguana_exchanges.c | 2 +- iguana/tests/LPinit | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/basilisk/basilisk_tradebot.c b/basilisk/basilisk_tradebot.c index 558f03d3c..51cdbe2b3 100755 --- a/basilisk/basilisk_tradebot.c +++ b/basilisk/basilisk_tradebot.c @@ -178,6 +178,10 @@ void basilisk_txlog(struct supernet_info *myinfo,struct basilisk_swap *swap,stru if ( (jsonstr= OS_filestr(&filesize,fname)) != 0 ) { jsonstr[strlen(jsonstr)-1] = ']'; + if ( jsonstr[strlen(jsonstr)-2] == ',' ) + jsonstr[strlen(jsonstr)-2] = ' '; + if ( jsonstr[strlen(jsonstr)-3] == ',' ) + jsonstr[strlen(jsonstr)-3] = ' '; if ( (dexobj= cJSON_Parse(jsonstr)) != 0 ) { if ( is_cJSON_Array(dexobj) != 0 && (n= cJSON_GetArraySize(dexobj)) > 0 ) diff --git a/iguana/iguana_exchanges.c b/iguana/iguana_exchanges.c index 8ff60232a..ab7a089e1 100755 --- a/iguana/iguana_exchanges.c +++ b/iguana/iguana_exchanges.c @@ -105,7 +105,7 @@ double instantdex_aveprice(struct supernet_info *myinfo,struct exchange_quote *s { pricesum += (quote.price * quote.volume); totalvol += quote.volume; - //printf("i.%d of %d %12.8f vol %.8f %s | aveprice %.8f total vol %.8f\n",i,n,sortbuf[i].price,quote.volume,active[quote.val]->exchange->name,pricesum/totalvol,totalvol); + printf("i.%d of %d %12.8f vol %.8f %s | aveprice %.8f total vol %.8f\n",i,n,sortbuf[i].price,quote.volume,active[quote.val]->exchange->name,pricesum/totalvol,totalvol); } } if ( totalvol > 0. ) diff --git a/iguana/tests/LPinit b/iguana/tests/LPinit index 0a286c33d..c1cb7ce95 100755 --- a/iguana/tests/LPinit +++ b/iguana/tests/LPinit @@ -1 +1 @@ -curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"tradebot\",\"method\":\"liquidity\",\"targetcoin\":\"BTCD\",\"vals\":{\"profit\":0.005}}" +curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"tradebot\",\"method\":\"liquidity\",\"targetcoin\":\"BTCD\",\"vals\":{\"profit\":0.01}}"