From d791ed57d3a34071f4c5c0fe94f4d668bf09080d Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Jun 2017 20:40:24 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_commands.c | 3 ++- iguana/tests/dexlistunspent | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index c839c5182..da9a8c07e 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -252,6 +252,7 @@ cJSON *LP_tradecandidates(struct LP_utxoinfo *myutxo,char *base) { item = jitem(array,i); //printf("%s\n",jprint(item,0)); + printf("i.%d %.8f %.8f, %.8f %.8f\n",i,dstr(estimatedbase),dstr(j64bits(item,"satoshis")),dstr(myutxo->satoshis),dstr(Q.destsatoshis)); safecopy(coinstr,jstr(item,"base"),sizeof(coinstr)); if ( strcmp(coinstr,base) == 0 && LP_sizematch(estimatedbase,j64bits(item,"satoshis")) == 0 ) { @@ -289,7 +290,7 @@ cJSON *LP_autotrade(struct LP_utxoinfo *myutxo,char *base,double maxprice) maxprice = LP_price(base,myutxo->coin) / 0.975; if ( (array= LP_tradecandidates(myutxo,base)) != 0 ) { - printf("candidates.(%s)\n",jprint(array,0)); + //printf("candidates.(%s)\n",jprint(array,0)); if ( (n= cJSON_GetArraySize(array)) > 0 ) { memset(prices,0,sizeof(prices)); diff --git a/iguana/tests/dexlistunspent b/iguana/tests/dexlistunspent index 4c06d2429..4e13419d8 100755 --- a/iguana/tests/dexlistunspent +++ b/iguana/tests/dexlistunspent @@ -1,2 +1,2 @@ #!/bin/bash -curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RYZx1e7kVNTuQ6RTrvTkYeZAz5uJobC3pg\",\"symbol\":\"KMD\"}" +curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNmvQtThVZAbc1tFEFmKAnJZrc9XqciNog\",\"symbol\":\"KMD\"}"