Browse Source

Test

etomic
jl777 7 years ago
parent
commit
2905ea6322
  1. 3
      iguana/exchanges/LP_nativeDEX.c
  2. 14
      iguana/exchanges/LP_utxos.c

3
iguana/exchanges/LP_nativeDEX.c

@ -19,9 +19,6 @@
// LP_nativeDEX.c
// marketmaker
//
// n41r0j [12:21 AM]
// when i remove funds from my smart addresses, the first time i do ./inv, it shows up empty, but after that, the old values come back
//[12:23] a restart of client fixes it though
// SPV at tx level and limit SPV proofing
// stats, fix pricearray

14
iguana/exchanges/LP_utxos.c

@ -36,6 +36,20 @@ int32_t LP_isavailable(struct LP_utxoinfo *utxo)
int32_t LP_isunspent(struct LP_utxoinfo *utxo)
{
struct LP_address_utxo *up; struct _LP_utxoinfo u; struct iguana_info *coin;
if ( (coin= LP_coinfind(utxo->coin)) == 0 )
return(0);
if ( (up= LP_address_utxofind(coin,utxo->coinaddr,utxo->payment.txid,utxo->payment.vout)) != 0 && up->spendheight > 0 )
{
utxo->T.spentflag = up->spendheight;
return(0);
}
u = (utxo->iambob != 0) ? utxo->deposit : utxo->fee;
if ( (up= LP_address_utxofind(coin,utxo->coinaddr,u.txid,u.vout)) != 0 && up->spendheight > 0 )
{
utxo->T.spentflag = up->spendheight;
return(0);
}
if ( utxo != 0 && utxo->T.spentflag == 0 && LP_isavailable(utxo) > 0 )
return(1);
else return(0);

Loading…
Cancel
Save