From 7e985f2604293b868b28aaea3f7219ca32b24b6c Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 4 Jul 2017 12:28:13 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_ordermatch.c | 3 --- iguana/exchanges/LP_utxos.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 93cb3cd61..0732db908 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -563,14 +563,11 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, char *LP_bestfit(char *rel,double relvolume) { struct LP_utxoinfo *autxo; cJSON *retjson; - printf("LP_bestfit\n"); if ( relvolume <= 0. || LP_priceinfofind(rel) == 0 ) return(clonestr("{\"error\":\"invalid parameter\"}")); - printf("call LP_utxo_bestfit\n"); if ( (autxo= LP_utxo_bestfit(rel,SATOSHIDEN * relvolume)) == 0 ) return(clonestr("{\"error\":\"cant find utxo that is big enough\"}")); retjson = LP_utxojson(autxo); - printf("autxo.%p %p\n",autxo,retjson); return(jprint(retjson,1)); } diff --git a/iguana/exchanges/LP_utxos.c b/iguana/exchanges/LP_utxos.c index 4a1c17f05..aa23a988a 100644 --- a/iguana/exchanges/LP_utxos.c +++ b/iguana/exchanges/LP_utxos.c @@ -342,7 +342,7 @@ struct LP_utxoinfo *LP_utxo_bestfit(char *symbol,uint64_t destsatoshis) return(0); HASH_ITER(hh,LP_utxoinfos[0],utxo,tmp) { - //char str[65]; printf("check %s.%s\n",utxo->coin,bits256_str(str,utxo->payment.txid)); + char str[65]; printf("check %s.%s avail.%d ismine.%d >= %d\n",utxo->coin,bits256_str(str,utxo->payment.txid),LP_isavailable(utxo) > 0,LP_ismine(utxo) > 0,utxo->S.satoshis >= destsatoshis); if ( strcmp(symbol,utxo->coin) == 0 && LP_isavailable(utxo) > 0 && LP_ismine(utxo) > 0 ) { if ( utxo->S.satoshis >= destsatoshis && (bestutxo == 0 || utxo->S.satoshis < bestutxo->S.satoshis) )