Browse Source

Test

etomic
jl777 7 years ago
parent
commit
d6123ab68a
  1. 8
      iguana/exchanges/LP_commands.c
  2. 4
      iguana/exchanges/LP_utxo.c

8
iguana/exchanges/LP_commands.c

@ -435,7 +435,7 @@ dividends(coin, height, <args>)\n\
coinaddr = jstr(argjson,"coinaddr"); coinaddr = jstr(argjson,"coinaddr");
if ( coin != 0 && coinaddr != 0 ) if ( coin != 0 && coinaddr != 0 )
{ {
char str[65]; printf("uitem %s %s %s/v%d %.8f ht.%d\n",coin,coinaddr,bits256_str(str,txid),vout,dstr(value),height); //char str[65]; printf("uitem %s %s %s/v%d %.8f ht.%d\n",coin,coinaddr,bits256_str(str,txid),vout,dstr(value),height);
LP_address_utxoadd(LP_coinfind(coin),coinaddr,txid,vout,value,height,-1); LP_address_utxoadd(LP_coinfind(coin),coinaddr,txid,vout,value,height,-1);
} }
return(clonestr("{\"result\":\"success\"}")); return(clonestr("{\"result\":\"success\"}"));
@ -476,7 +476,7 @@ dividends(coin, height, <args>)\n\
retstr = LP_spentcheck(argjson); retstr = LP_spentcheck(argjson);
else if ( strcmp(method,"addr_unspents") == 0 ) else if ( strcmp(method,"addr_unspents") == 0 )
{ {
printf("GOT ADDR_UNSPENTS %s %s\n",jstr(argjson,"coin"),jstr(argjson,"address")); //printf("GOT ADDR_UNSPENTS %s %s\n",jstr(argjson,"coin"),jstr(argjson,"address"));
if ( (ptr= LP_coinsearch(jstr(argjson,"coin"))) != 0 ) if ( (ptr= LP_coinsearch(jstr(argjson,"coin"))) != 0 )
{ {
char *coinaddr; //cJSON *array,*item,*req; int32_t i,n,vout,height; bits256 zero,txid; uint64_t value; char *coinaddr; //cJSON *array,*item,*req; int32_t i,n,vout,height; bits256 zero,txid; uint64_t value;
@ -486,7 +486,7 @@ dividends(coin, height, <args>)\n\
{ {
if ( strcmp(coinaddr,ptr->smartaddr) == 0 && bits256_nonz(G.LP_mypriv25519) != 0 ) if ( strcmp(coinaddr,ptr->smartaddr) == 0 && bits256_nonz(G.LP_mypriv25519) != 0 )
{ {
printf("ADDR_UNSPENTS %s %s is my address being asked for!\n",ptr->symbol,coinaddr); //printf("ADDR_UNSPENTS %s %s is my address being asked for!\n",ptr->symbol,coinaddr);
ptr->addr_listunspent_requested = (uint32_t)time(NULL); ptr->addr_listunspent_requested = (uint32_t)time(NULL);
} }
} }
@ -552,7 +552,7 @@ dividends(coin, height, <args>)\n\
else else
{ {
memset(zero.bytes,0,sizeof(zero)); memset(zero.bytes,0,sizeof(zero));
printf("broadcast.(%s)\n",Broadcaststr); //printf("broadcast.(%s)\n",Broadcaststr);
LP_reserved_msg(base!=0?base:jstr(argjson,"coin"),rel,zero,jprint(reqjson,0)); LP_reserved_msg(base!=0?base:jstr(argjson,"coin"),rel,zero,jprint(reqjson,0));
} }
retstr = clonestr("{\"result\":\"success\"}"); retstr = clonestr("{\"result\":\"success\"}");

4
iguana/exchanges/LP_utxo.c

@ -198,7 +198,7 @@ int32_t LP_address_utxoadd(struct iguana_info *coin,char *coinaddr,bits256 txid,
if ( spendheight > 0 ) // dont autocreate entries for spends we dont care about if ( spendheight > 0 ) // dont autocreate entries for spends we dont care about
ap = LP_addressfind(coin,coinaddr); ap = LP_addressfind(coin,coinaddr);
else ap = LP_address(coin,coinaddr); else ap = LP_address(coin,coinaddr);
printf("%s add addr.%s ht.%d ap.%p\n",coin->symbol,coinaddr,height,ap); //printf("%s add addr.%s ht.%d ap.%p\n",coin->symbol,coinaddr,height,ap);
if ( ap != 0 ) if ( ap != 0 )
{ {
flag = 0; flag = 0;
@ -217,7 +217,7 @@ int32_t LP_address_utxoadd(struct iguana_info *coin,char *coinaddr,bits256 txid,
up->spendheight = spendheight, flag |= 4; up->spendheight = spendheight, flag |= 4;
if ( up->U.value == 0 && up->U.value != value ) if ( up->U.value == 0 && up->U.value != value )
up->U.value = value, flag |= 8; 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)); //printf("found >>>>>>>>>> %s %s %s/v%d ht.%d %.8f\n",coin->symbol,coinaddr,bits256_str(str,txid),vout,height,dstr(value));
break; break;
} }
} }

Loading…
Cancel
Save