jl777 7 years ago
parent
commit
5e4d6beeba
  1. 14
      iguana/exchanges/LP_utxo.c

14
iguana/exchanges/LP_utxo.c

@ -153,7 +153,18 @@ int32_t LP_address_utxo_ptrs(struct iguana_info *coin,int32_t iambob,struct LP_a
if ( coin->electrum == 0 ) if ( coin->electrum == 0 )
{ {
if ( (txout= LP_gettxout(coin->symbol,coinaddr,up->U.txid,up->U.vout)) != 0 ) if ( (txout= LP_gettxout(coin->symbol,coinaddr,up->U.txid,up->U.vout)) != 0 )
{
if ( LP_value_extract(txout,0) == 0 )
{
printf("LP_address_utxo_ptrs skip zero value %s/v%d\n",bits256_str(str,up->U.txid),up->U.vout);
free_json(txout);
up->spendheight = 1;
if ( (tx= LP_transactionfind(coin,up->U.txid)) != 0 && up->U.vout < tx->numvouts )
tx->outpoints[up->U.vout].spendheight = 1;
continue;
}
free_json(txout); free_json(txout);
}
else else
{ {
printf("LP_address_utxo_ptrs skips %s %s payment %s/v%d is spent\n",coin->symbol,coinaddr,bits256_str(str,up->U.txid),up->U.vout); printf("LP_address_utxo_ptrs skips %s %s payment %s/v%d is spent\n",coin->symbol,coinaddr,bits256_str(str,up->U.txid),up->U.vout);
@ -168,6 +179,9 @@ int32_t LP_address_utxo_ptrs(struct iguana_info *coin,int32_t iambob,struct LP_a
if ( up->SPV <= 0 || up->U.height == 0 ) if ( up->SPV <= 0 || up->U.height == 0 )
{ {
printf("LP_address_utxo_ptrs skips %s/v%u due to SPV.%d ht.%d\n",bits256_str(str,up->U.txid),up->U.vout,up->SPV,up->U.height); printf("LP_address_utxo_ptrs skips %s/v%u due to SPV.%d ht.%d\n",bits256_str(str,up->U.txid),up->U.vout,up->SPV,up->U.height);
if ( (tx= LP_transactionfind(coin,up->U.txid)) != 0 && up->U.vout < tx->numvouts )
tx->outpoints[up->U.vout].spendheight = 1;
continue;
} }
} }
if ( LP_allocated(up->U.txid,up->U.vout) == 0 ) if ( LP_allocated(up->U.txid,up->U.vout) == 0 )

Loading…
Cancel
Save