diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index e703bed80..f20f0165f 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -357,11 +357,11 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int } HASH_ITER(hh,LP_coins,coin,ctmp) // firstrefht,firstscanht,lastscanht { - int32_t height,i,j,n,m,v,post; bits256 zero,txid,txid2; cJSON *array,*item,*item2,*array2; uint64_t total,total2; + int32_t height,i,j,n,m,v,post; bits256 zero,txid; cJSON *array,*item,*item2,*array2; uint64_t total,total2; memset(&zero,0,sizeof(zero)); if ( coin->inactive != 0 ) continue; - if ( (rand() % 100) == 0 ) + if ( (rand() % 1000) == 0 ) { post = 0; LP_listunspent_both(coin->symbol,coin->smartaddr); diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index a7da800ef..9b19e18d9 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -372,6 +372,10 @@ cJSON *LP_gettxout(char *symbol,bits256 txid,int32_t vout) free_json(array); } } else free(hexstr); + if ( retjson == 0 ) + { + + } return(retjson); } return(cJSON_Parse("{\"error\":\"couldnt get tx\"}")); diff --git a/iguana/exchanges/LP_utxo.c b/iguana/exchanges/LP_utxo.c index 8afc2a18f..ea9ecccb9 100644 --- a/iguana/exchanges/LP_utxo.c +++ b/iguana/exchanges/LP_utxo.c @@ -249,7 +249,7 @@ cJSON *LP_address_utxos(struct iguana_info *coin,char *coinaddr,int32_t electrum DL_FOREACH_SAFE(ap->utxos,up,tmp) { //char str[65]; printf("LP_address_utxos %s/v%d %.8f ht.%d spend.%d\n",bits256_str(str,up->U.txid),up->U.vout,dstr(up->U.value),up->U.height,up->spendheight); - if ( up->spendheight <= 0 ) + if ( up->spendheight <= 0 && up->U.height > 0 ) { jaddi(array,LP_address_item(coin,up,electrumret)); //printf("new array %s\n",jprint(array,0));