jl777 7 years ago
parent
commit
038edb1179
  1. 2
      iguana/exchanges/LP_signatures.c
  2. 6
      iguana/exchanges/LP_utxo.c

2
iguana/exchanges/LP_signatures.c

@ -591,7 +591,7 @@ char *LP_uitem_recv(cJSON *argjson)
coinaddr = jstr(argjson,"coinaddr");
if ( (symbol= jstr(argjson,"coin")) != 0 && coinaddr != 0 )
{
char str[65]; printf("uitem %s %s %s/v%d %.8f ht.%d\n",symbol,coinaddr,bits256_str(str,txid),vout,dstr(value),height);
//char str[65]; printf("uitem %s %s %s/v%d %.8f ht.%d\n",symbol,coinaddr,bits256_str(str,txid),vout,dstr(value),height);
LP_address_utxoadd("LP_uitem,recv",LP_coinfind(symbol),coinaddr,txid,vout,value,height,-1);
}
return(clonestr("{\"result\":\"success\"}"));

6
iguana/exchanges/LP_utxo.c

@ -199,13 +199,13 @@ int32_t LP_address_utxoadd(char *debug,struct iguana_info *coin,char *coinaddr,b
up->U.height = height, flag |= 2;
if ( spendheight > 0 && up->spendheight != spendheight )
up->spendheight = spendheight, flag |= 4;
if ( up->U.value == 0 && up->U.value != value )
if ( value != 0 && up->U.value == 0 && up->U.value != value )
up->U.value = value, flag |= 8;
//printf("found >>>>>>>>>> %s %s %s/v%d ht.%d %.8f\n",coin->symbol,coinaddr,bits256_str(str,txid),vout,height,dstr(value));
break;
}
}
if ( flag == 0 )
if ( flag == 0 && value != 0 )
{
if ( coin->electrum == 0 )
{
@ -569,7 +569,7 @@ cJSON *LP_transactioninit(struct iguana_info *coin,bits256 txid,int32_t iter,cJS
tx->outpoints[i].value = LP_value_extract(vout,0);
tx->outpoints[i].interest = SATOSHIDEN * jdouble(vout,"interest");
LP_destaddr(tx->outpoints[i].coinaddr,vout);
printf("from transaction init %s %s %s/v%d <- %.8f\n",coin->symbol,tx->outpoints[i].coinaddr,bits256_str(str,txid),i,dstr(tx->outpoints[i].value));
//printf("from transaction init %s %s %s/v%d <- %.8f\n",coin->symbol,tx->outpoints[i].coinaddr,bits256_str(str,txid),i,dstr(tx->outpoints[i].value));
LP_address_utxoadd("LP_transactioninit iter0",coin,tx->outpoints[i].coinaddr,txid,i,tx->outpoints[i].value,height,-1);
}
//printf("numvouts.%d\n",numvouts);

Loading…
Cancel
Save