From 38063786eaed5dc6dc1a269b911c8fdd3117e03c Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 21 Sep 2016 10:53:58 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 1 + basilisk/basilisk_DEX.c | 10 ++++------ basilisk/basilisk_tradebot.c | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index 915014299..69bda804f 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -822,6 +822,7 @@ void basilisk_requests_poll(struct supernet_info *myinfo) } else printf("null incoming\n"); if ( hwm > 0. ) { + printf("hwm %f\n",hwm); if ( bits256_cmp(myinfo->myaddr.persistent,issueR.srchash) == 0 ) // my request { printf("my req hwm %f\n",hwm); diff --git a/basilisk/basilisk_DEX.c b/basilisk/basilisk_DEX.c index 34b0ec787..2c270a2c0 100755 --- a/basilisk/basilisk_DEX.c +++ b/basilisk/basilisk_DEX.c @@ -423,7 +423,7 @@ STRING_ARG(InstantDEX,available,source) { if ( (retstr= basilisk_balances(myinfo,coin,0,0,GENESIS_PUBKEY,vals,"")) != 0 ) { - printf("available.(%s)\n",retstr); + //printf("available.(%s)\n",retstr); if ( (balancejson= cJSON_Parse(retstr)) != 0 ) { if ( (unspents= jarray(&n,balancejson,"unspents")) != 0 ) @@ -434,17 +434,15 @@ STRING_ARG(InstantDEX,available,source) if ( jobj(item,"unspent") != 0 ) { total += jdouble(item,"amount") * SATOSHIDEN; - printf("(%s) -> %.8f\n",jprint(item,0),dstr(total)); } + //printf("(%s) -> %.8f\n",jprint(item,0),dstr(total)); } - } -if ( total == 0 ) -total = 500000; + } else printf("no unspents in available\n"); retjson = cJSON_CreateObject(); jaddnum(retjson,"result",dstr(total)); free_json(balancejson); printf("n.%d total %.8f (%s)\n",n,dstr(total),jprint(retjson,0)); - } + } else printf("parse error.(%s)\n",retstr); free(retstr); } free_json(vals); diff --git a/basilisk/basilisk_tradebot.c b/basilisk/basilisk_tradebot.c index 0885f4498..2965590d0 100755 --- a/basilisk/basilisk_tradebot.c +++ b/basilisk/basilisk_tradebot.c @@ -216,6 +216,7 @@ double basilisk_request_listprocess(struct supernet_info *myinfo,struct basilisk issueR->desthash = myinfo->myaddr.persistent; issueR->destamount = destamount; issueR->quotetime = (uint32_t)time(NULL); + printf("issueR set!\n"); } } else if ( myrequest != 0 && pendingid == 0 && maxi >= 0 ) // automatch best quote