From 1327ee506d9d3965bbbf01437bfa16cf676a8d9b Mon Sep 17 00:00:00 2001 From: jl777 <jameslee777@yahoo.com> Date: Tue, 27 Feb 2018 19:55:07 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_transaction.c | 2 +- iguana/exchanges/LP_utxo.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/iguana/exchanges/LP_transaction.c b/iguana/exchanges/LP_transaction.c index 11ba55eef..dda7eb260 100644 --- a/iguana/exchanges/LP_transaction.c +++ b/iguana/exchanges/LP_transaction.c @@ -70,9 +70,9 @@ int32_t LP_gettx_presence(int32_t *numconfirmsp,char *symbol,bits256 expectedtxi txid = jbits256(txobj,"txid"); if ( jobj(txobj,"error") == 0 && bits256_cmp(txid,expectedtxid) == 0 ) { + *numconfirmsp = 0; if ( numconfirmsp != 0 && coinaddr != 0 && (coin= LP_coinfind(symbol)) != 0 && coin->electrum != 0 ) { - *numconfirmsp = 0; //char str[65]; printf("%s %s already in gettx (%s)\n",coinaddr,bits256_str(str,txid),jprint(txobj,0)); if ( (retjson= electrum_address_gethistory(symbol,coin->electrum,&retjson,coinaddr,expectedtxid)) != 0 ) { diff --git a/iguana/exchanges/LP_utxo.c b/iguana/exchanges/LP_utxo.c index ab70469e6..43d7f3865 100644 --- a/iguana/exchanges/LP_utxo.c +++ b/iguana/exchanges/LP_utxo.c @@ -871,10 +871,10 @@ int32_t LP_txheight(struct iguana_info *coin,bits256 txid) bits256 blockhash; struct LP_transaction *tx=0; cJSON *blockobj,*retjson,*txobj,*txobj2; int32_t height = 0; if ( coin == 0 ) return(-1); - /*if ( (tx= LP_transactionfind(coin,txid)) != 0 ) + if ( (tx= LP_transactionfind(coin,txid)) != 0 ) height = tx->height; - if ( height > 1 ) - return(height);*/ + if ( height > 0 ) + return(height); if ( coin->electrum == 0 ) { if ( (txobj= LP_gettx("LP_txheight",coin->symbol,txid,0)) != 0 ) @@ -906,8 +906,8 @@ int32_t LP_txheight(struct iguana_info *coin,bits256 txid) } else { - if ( (tx= LP_transactionfind(coin,txid)) != 0 ) - height = tx->height; + //if ( (tx= LP_transactionfind(coin,txid)) != 0 ) + // height = tx->height; if ( height == 0 ) { if ( (retjson= electrum_transaction(&height,coin->symbol,coin->electrum,&retjson,txid,0)) != 0 )