jl777 7 years ago
parent
commit
e1ae0f661c
  1. 4
      iguana/exchanges/LP_nativeDEX.c
  2. 4
      iguana/exchanges/LP_rpc.c
  3. 2
      iguana/exchanges/LP_utxo.c

4
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);

4
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\"}"));

2
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));

Loading…
Cancel
Save