|
|
@ -466,7 +466,7 @@ void utxosQ_loop(void *myipaddr) |
|
|
|
|
|
|
|
void LP_coinsloop(void *_coins) |
|
|
|
{ |
|
|
|
struct LP_address *ap=0; struct LP_transaction *tx; cJSON *retjson; struct LP_address_utxo *up,*tmp; struct iguana_info *coin,*ctmp; char str[65]; struct electrum_info *ep,*backupep=0; bits256 zero; int32_t oldht,j,nonz; char *coins = _coins; |
|
|
|
struct LP_address *ap=0,*atmp; struct LP_transaction *tx; cJSON *retjson; struct LP_address_utxo *up,*tmp; struct iguana_info *coin,*ctmp; char str[65]; struct electrum_info *ep,*backupep=0; bits256 zero; int32_t oldht,j,nonz; char *coins = _coins; |
|
|
|
if ( strcmp("BTC",coins) == 0 ) |
|
|
|
{ |
|
|
|
strcpy(LP_coinsloopBTC_stats.name,"BTC coin loop"); |
|
|
@ -514,11 +514,18 @@ void LP_coinsloop(void *_coins) |
|
|
|
{ |
|
|
|
if ( (backupep= ep->prev) == 0 ) |
|
|
|
backupep = ep; |
|
|
|
//HASH_ITER(hh,coin->addresses,ap,atmp)
|
|
|
|
if ( (ap= LP_addressfind(coin,coin->smartaddr)) != 0 ) |
|
|
|
{ |
|
|
|
if ( (retjson= electrum_address_listunspent(coin->symbol,ep,&retjson,ap->coinaddr,1)) != 0 ) |
|
|
|
free_json(retjson); |
|
|
|
} |
|
|
|
HASH_ITER(hh,coin->addresses,ap,atmp) |
|
|
|
{ |
|
|
|
if ( (retjson= electrum_address_listunspent(coin->symbol,ep,&retjson,ap->coinaddr,1)) != 0 ) |
|
|
|
free_json(retjson); |
|
|
|
} |
|
|
|
HASH_ITER(hh,coin->addresses,ap,atmp) |
|
|
|
{ |
|
|
|
DL_FOREACH_SAFE(ap->utxos,up,tmp) |
|
|
|
{ |
|
|
|
if ( up->U.height > 0 && up->spendheight < 0 ) |
|
|
|