diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index f00d83a07..cd7a89620 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -519,9 +519,7 @@ cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON cJSON *retjson=0; struct LP_address *ap; struct iguana_info *coin; int32_t height,usecache=1; if ( (coin= LP_coinfind(symbol)) == 0 ) return(0); - if ( ep->heightp == 0 ) - height = coin->longestchain; - else height = *(ep->heightp); + height = coin->longestchain; if ( (ap= LP_address(coin,addr)) != 0 ) { if ( ap->unspenttime == 0 ) diff --git a/iguana/exchanges/LP_utxo.c b/iguana/exchanges/LP_utxo.c index f8e20742a..22d8142a1 100644 --- a/iguana/exchanges/LP_utxo.c +++ b/iguana/exchanges/LP_utxo.c @@ -191,6 +191,11 @@ int32_t LP_address_utxo_ptrs(struct iguana_info *coin,int32_t iambob,struct LP_a break; } } + else + { + if ( (tx= LP_transactionfind(coin,up->U.txid)) != 0 && up->U.vout < tx->numvouts ) + tx->outpoints[up->U.vout].spendheight = 1; + } } portable_mutex_unlock(&LP_utxomutex); //printf("return n.%d\n",n); @@ -276,8 +281,8 @@ int32_t LP_address_utxoadd(char *debug,struct iguana_info *coin,char *coinaddr,b DL_APPEND(ap->utxos,up); portable_mutex_unlock(&coin->addrmutex); retval = 1; - if ( value == 0 ) - printf("%s null? ADD UTXO >> %s %s %s/v%d ht.%d %.8f\n",debug,coin->symbol,coinaddr,bits256_str(str,txid),vout,height,dstr(value)); + //if ( value == 0 ) + printf("%s ADD UTXO >> %s %s %s/v%d ht.%d %.8f\n",debug,coin->symbol,coinaddr,bits256_str(str,txid),vout,height,dstr(value)); } } // else printf("cant get ap %s %s\n",coin->symbol,coinaddr); //printf("done %s add addr.%s ht.%d\n",coin->symbol,coinaddr,height);