Browse Source

Test

etomic
jl777 7 years ago
parent
commit
5470b73651
  1. 8
      iguana/exchanges/LP_commands.c
  2. 6
      iguana/exchanges/LP_nativeDEX.c

8
iguana/exchanges/LP_commands.c

@ -342,9 +342,15 @@ bot_resume(botid)\n\
if ( LP_conflicts_find(ptr) == 0 )
{
ptr->inactive = 0;
cJSON *array = cJSON_CreateArray();
cJSON *array;
if ( ptr->smartaddr[0] != 0 )
LP_unspents_load(coin,ptr->smartaddr);
if ( LP_getheight(ptr) <= 0 )
{
ptr->inactive = (uint32_t)time(NULL);
return(clonestr("{\"error\":\"coin cant be activated till synced\"}"));
} else LP_unspents_load(coin,ptr->smartaddr);
array = cJSON_CreateArray();
jaddi(array,LP_coinjson(ptr,0));
return(jprint(array,1));
} else return(clonestr("{\"error\":\"coin port conflicts with existing coin\"}"));

6
iguana/exchanges/LP_nativeDEX.c

@ -726,7 +726,7 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int
{
if ( coin->addr_listunspent_requested != 0 && time(NULL) > coin->lastpushtime+10 )
{
printf("PUSH addr_listunspent_requested %u\n",coin->addr_listunspent_requested);
//printf("PUSH addr_listunspent_requested %u\n",coin->addr_listunspent_requested);
coin->lastpushtime = (uint32_t)time(NULL);
LP_smartutxos_push(coin);
coin->addr_listunspent_requested = 0;
@ -759,7 +759,7 @@ void LP_initcoins(void *ctx,int32_t pubsock,cJSON *coins)
{
if ( LP_getheight(coin) <= 0 )
coin->inactive = (uint32_t)time(NULL);
LP_unspents_load(coin->symbol,coin->smartaddr);
else LP_unspents_load(coin->symbol,coin->smartaddr);
}
}
if ( (n= cJSON_GetArraySize(coins)) > 0 )
@ -776,7 +776,7 @@ void LP_initcoins(void *ctx,int32_t pubsock,cJSON *coins)
{
if ( LP_getheight(coin) <= 0 )
coin->inactive = (uint32_t)time(NULL);
LP_unspents_load(coin->symbol,coin->smartaddr);
else LP_unspents_load(coin->symbol,coin->smartaddr);
}
}
}

Loading…
Cancel
Save