|
|
@ -419,10 +419,20 @@ struct LP_address *LP_address_utxo_reset(struct iguana_info *coin) |
|
|
|
{ |
|
|
|
//{"tx_hash":"38d1b7c73015e1b1d6cb7fc314cae402a635b7d7ea294970ab857df8777a66f4","tx_pos":0,"height":577975,"value":238700}
|
|
|
|
item = jitem(array,i); |
|
|
|
txid = jbits256(item,"tx_hash"); |
|
|
|
vout = juint(item,"tx_pos"); |
|
|
|
value = j64bits(item,"value"); |
|
|
|
height = jint(item,"height"); |
|
|
|
if ( coin->electrum != 0 ) |
|
|
|
{ |
|
|
|
txid = jbits256(item,"tx_hash"); |
|
|
|
vout = juint(item,"tx_pos"); |
|
|
|
value = j64bits(item,"value"); |
|
|
|
height = jint(item,"height"); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
txid = jbits256(item,"txid"); |
|
|
|
vout = juint(item,"vout"); |
|
|
|
value = LP_value_extract(item,0); |
|
|
|
height = LP_txheight(coin,txid); |
|
|
|
} |
|
|
|
LP_address_utxoadd(now,"withdraw",coin,coin->smartaddr,txid,vout,value,height,-1); |
|
|
|
if ( (up= LP_address_utxofind(coin,coin->smartaddr,txid,vout)) == 0 ) |
|
|
|
printf("couldnt find just added %s/%d ht.%d %.8f\n",bits256_str(str,txid),vout,height,dstr(value)); |
|
|
|