Browse Source

Test

etomic
jl777 7 years ago
parent
commit
319110dcab
  1. 2
      iguana/exchanges/LP_scan.c
  2. 10
      iguana/exchanges/LP_utxos.c

2
iguana/exchanges/LP_scan.c

@ -127,7 +127,7 @@ int32_t LP_transactioninit(struct iguana_info *coin,bits256 txid,int32_t iter)
vouts = jarray(&numvouts,txobj,"vout");
if ( iter == 0 && vouts != 0 && (tx= LP_transactionadd(coin,txid,height,numvouts,numvins)) != 0 )
{
printf("create txid numvouts.%d numvins.%d\n",numvouts,numvins);
//printf("create txid numvouts.%d numvins.%d\n",numvouts,numvins);
for (i=0; i<numvouts; i++)
{
vout = jitem(vouts,i);

10
iguana/exchanges/LP_utxos.c

@ -378,11 +378,17 @@ char *LP_utxos(int32_t iambob,struct LP_peerinfo *mypeer,char *symbol,int32_t la
return(jprint(utxosjson,1));
}
int32_t LP_inventory_prevent(int32_t iambob,bits256 txid,int32_t vout)
int32_t LP_inventory_prevent(int32_t iambob,char *symbol,bits256 txid,int32_t vout)
{
struct LP_utxoinfo *utxo;
struct LP_utxoinfo *utxo; struct LP_transaction *tx; struct iguana_info *coin;
if ( (utxo= LP_utxofind(iambob,txid,vout)) != 0 || (utxo= LP_utxo2find(iambob,txid,vout)) != 0 )
{
if ( (coin= LP_coinfind(symbol)) != 0 && (tx= LP_transactionfind(coin,txid)) != 0 )
{
if ( tx->outpoints[vout].spendheight > 0 )
utxo->T.spentflag = tx->outpoints[vout].spendheight;
else utxo->T.spentflag = 0;
}
if ( utxo->T.spentflag != 0 )
{
char str[65]; printf("prevent adding iambob.%d %s/v%d to inventory\n",iambob,bits256_str(str,txid),vout);

Loading…
Cancel
Save