Browse Source

Test

etomic
jl777 7 years ago
parent
commit
247112cf38
  1. 8
      iguana/exchanges/LP_commands.c

8
iguana/exchanges/LP_commands.c

@ -418,7 +418,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\n"); //printf("GOT ADDR_UNSPENTS\n");
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;
@ -428,7 +428,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("%s %s is my address being asked for!\n",ptr->symbol,coinaddr); //printf("%s %s is my address being asked for!\n",ptr->symbol,coinaddr);
if ( (array= LP_address_utxos(ptr,coinaddr,1)) != 0 ) if ( (array= LP_address_utxos(ptr,coinaddr,1)) != 0 )
{ {
memset(zero.bytes,0,sizeof(zero)); memset(zero.bytes,0,sizeof(zero));
@ -437,8 +437,8 @@ dividends(coin, height, <args>)\n\
for (i=0; i<n; i++) for (i=0; i<n; i++)
{ {
item = jitem(array,i); item = jitem(array,i);
txid = jbits256(item,"txid"); txid = jbits256(item,"tx_hash");
vout = jint(item,"vout"); vout = jint(item,"tx_pos");
height = jint(item,"height"); height = jint(item,"height");
value = j64bits(item,"value"); value = j64bits(item,"value");
req = cJSON_CreateObject(); req = cJSON_CreateObject();

Loading…
Cancel
Save