Browse Source

Test

etomic
jl777 7 years ago
parent
commit
8dd3b65206
  1. 3
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/LP_socket.c
  3. 6
      iguana/exchanges/LP_utxos.c

3
iguana/exchanges/LP_commands.c

@ -388,16 +388,13 @@ bot_resume(botid)\n\
if ( (ptr= LP_coinsearch(coin)) != 0 )
{
char *coinaddr;
printf("listunspent\n");
if ( (coinaddr= jstr(argjson,"address")) != 0 )
{
if ( coinaddr[0] != 0 )
{
LP_address(ptr,coinaddr);
printf("check addr\n");
if ( strcmp(coinaddr,ptr->smartaddr) == 0 && bits256_nonz(G.LP_privkey) != 0 )
{
printf("my addr\n");
LP_listunspent_issue(coin,coinaddr,2);
LP_privkey_init(-1,ptr,G.LP_privkey,G.LP_mypub25519);
//LP_smartutxos_push(ptr);

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 ( 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)));
updatedflag = 0;
if ( electrum_process_array(coin,ep,addr,retjson,electrumflag) != 0 )

6
iguana/exchanges/LP_utxos.c

@ -542,15 +542,15 @@ int32_t LP_privkey_init(int32_t mypubsock,struct iguana_info *coin,bits256 mypri
//printf("coin not active\n");
return(0);
}
if ( bits256_cmp(myprivkey,coin->lastprivkey) == 0 && time(NULL) < coin->lastprivkeytime+60 )
return(0);
/*if ( bits256_cmp(myprivkey,coin->lastprivkey) == 0 && time(NULL) < coin->lastprivkeytime+60 )
return(0);*/
coin->lastprivkey = myprivkey;
coin->lastprivkeytime = (uint32_t)time(NULL);
if ( coin->privkeydepth > 0 )
return(0);
coin->privkeydepth++;
LP_address(coin,coin->smartaddr);
printf("privkey init.(%s) %s depth.%d\n",coin->symbol,coin->smartaddr,coin->privkeydepth);
//printf("privkey init.(%s) %s depth.%d\n",coin->symbol,coin->smartaddr,coin->privkeydepth);
if ( coin->inactive == 0 )
LP_listunspent_issue(coin->symbol,coin->smartaddr,0);
array = LP_listunspent(coin->symbol,coin->smartaddr);

Loading…
Cancel
Save