Browse Source

Test

etomic
jl777 7 years ago
parent
commit
0ddb676a88
  1. 6
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/LP_rpc.c
  3. 2
      iguana/exchanges/LP_socket.c

6
iguana/exchanges/LP_commands.c

@ -426,7 +426,7 @@ zeroconf_claim(address, expiration=0)\n\
if ( coinaddr[0] != 0 ) if ( coinaddr[0] != 0 )
{ {
LP_address(ptr,coinaddr); LP_address(ptr,coinaddr);
LP_listunspent_issue(coin,coinaddr,2); //LP_listunspent_issue(coin,coinaddr,2);
if ( strcmp(coinaddr,ptr->smartaddr) == 0 && bits256_nonz(G.LP_privkey) != 0 ) if ( strcmp(coinaddr,ptr->smartaddr) == 0 && bits256_nonz(G.LP_privkey) != 0 )
{ {
LP_privkey_init(-1,ptr,G.LP_privkey,G.LP_mypub25519); LP_privkey_init(-1,ptr,G.LP_privkey,G.LP_mypub25519);
@ -437,8 +437,8 @@ zeroconf_claim(address, expiration=0)\n\
//return(LP_unspents_filestr(coin,coinaddr)); //return(LP_unspents_filestr(coin,coinaddr));
//else return(jprint(LP_address_utxos(ptr,coinaddr,1),1)); //else return(jprint(LP_address_utxos(ptr,coinaddr,1),1));
} }
return(jprint(LP_address_utxos(ptr,coinaddr,1),1)); }
} else return(clonestr("{\"error\":\"no address specified\"}")); return(clonestr("{\"error\":\"no address specified\"}"));
} else return(clonestr("{\"error\":\"cant find coind\"}")); } else return(clonestr("{\"error\":\"cant find coind\"}"));
} }
else if ( strcmp(method,"balance") == 0 ) else if ( strcmp(method,"balance") == 0 )

2
iguana/exchanges/LP_rpc.c

@ -657,7 +657,7 @@ cJSON *LP_listunspent(char *symbol,char *coinaddr)
if ( symbol == 0 || symbol[0] == 0 ) if ( symbol == 0 || symbol[0] == 0 )
return(cJSON_Parse("{\"error\":\"null symbol\"}")); return(cJSON_Parse("{\"error\":\"null symbol\"}"));
coin = LP_coinfind(symbol); coin = LP_coinfind(symbol);
printf("LP_listunspent.(%s %s)\n",symbol,coinaddr); //printf("LP_listunspent.(%s %s)\n",symbol,coinaddr);
if ( coin == 0 || (IAMLP == 0 && coin->inactive != 0) ) if ( coin == 0 || (IAMLP == 0 && coin->inactive != 0) )
return(cJSON_Parse("{\"error\":\"no coin\"}")); return(cJSON_Parse("{\"error\":\"no coin\"}"));
if ( coin->electrum == 0 ) if ( coin->electrum == 0 )

2
iguana/exchanges/LP_socket.c

@ -598,7 +598,7 @@ cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON
{ {
if ( jobj(retjson,"error") == 0 && is_cJSON_Array(retjson) != 0 ) if ( jobj(retjson,"error") == 0 && is_cJSON_Array(retjson) != 0 )
{ {
if ( 1 && electrumflag > 1 ) if ( 0 && electrumflag > 1 )
printf("%s.%d u.%u/%d t.%ld %s LISTUNSPENT.(%d)\n",coin->symbol,height,ap->unspenttime,ap->unspentheight,time(NULL),addr,(int32_t)strlen(jprint(retjson,0))); printf("%s.%d u.%u/%d t.%ld %s LISTUNSPENT.(%d)\n",coin->symbol,height,ap->unspenttime,ap->unspentheight,time(NULL),addr,(int32_t)strlen(jprint(retjson,0)));
updatedflag = 0; updatedflag = 0;
if ( electrum_process_array(coin,ep,addr,retjson,electrumflag) != 0 ) if ( electrum_process_array(coin,ep,addr,retjson,electrumflag) != 0 )

Loading…
Cancel
Save