From 8c0370073527f37d733a9d79c8388a9f05ca992f Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 6 Dec 2017 12:57:16 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_transaction.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/iguana/exchanges/LP_transaction.c b/iguana/exchanges/LP_transaction.c index 5d33f1ecf..9a2f8cf4a 100644 --- a/iguana/exchanges/LP_transaction.c +++ b/iguana/exchanges/LP_transaction.c @@ -1350,7 +1350,7 @@ char *LP_withdraw(struct iguana_info *coin,cJSON *argjson) if ( signedtx == 0 ) break; datalen = (int32_t)strlen(signedtx) / 2; - if ( strcmp(coin->symbol,"BTC") == 0 ) + if ( iter == 0 && strcmp(coin->symbol,"BTC") == 0 ) { newtxfee = LP_txfeecalc(coin,0,datalen); printf("txfee %.8f -> newtxfee %.8f, numvins.%d\n",dstr(txfee),dstr(newtxfee),numvins); @@ -1360,15 +1360,15 @@ char *LP_withdraw(struct iguana_info *coin,cJSON *argjson) //printf("set available %s\n",jprint(item,0)); LP_availableset(jbits256(item,"txid"),jint(item,"vout")); } + free_json(vins), vins = 0; + free_json(txobj), txobj = 0; + free_json(privkeys), privkeys = 0; + if ( rawtx != 0 ) + free(rawtx), rawtx = 0; + if ( signedtx != 0 ) + free(signedtx), signedtx = 0; } else break; } else break; - free_json(vins), vins = 0; - free_json(txobj), txobj = 0; - free_json(privkeys), privkeys = 0; - if ( rawtx != 0 ) - free(rawtx), rawtx = 0; - if ( signedtx != 0 ) - free(signedtx), signedtx = 0; } free(V); if ( vins != 0 )