jl777 8 years ago
parent
commit
d70d7f9104
  1. 2
      iguana/exchanges/LP_commands.c
  2. 5
      iguana/exchanges/LP_nativeDEX.c

2
iguana/exchanges/LP_commands.c

@ -35,7 +35,7 @@ char *LP_numutxos()
char *stats_JSON(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,char *remoteaddr,uint16_t port) // from rpc port
{
char *method,*ipaddr,*userpass,*base,*rel,*coin,*retstr = 0; uint16_t argport=0,pushport,subport; int32_t changed,otherpeers,flag = 0; struct LP_peerinfo *peer; cJSON *retjson,*reqjson = 0; struct iguana_info *ptr;
printf("stats_JSON(%s)\n",jprint(argjson,0));
//printf("stats_JSON(%s)\n",jprint(argjson,0));
method = jstr(argjson,"method");
if ( (ipaddr= jstr(argjson,"ipaddr")) != 0 && (argport= juint(argjson,"port")) != 0 && (method == 0 || strcmp(method,"electrum") != 0) )
{

5
iguana/exchanges/LP_nativeDEX.c

@ -368,7 +368,7 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int
if ( coin->rate != 0 )
coin->updaterate = 0;
}*/
if ( (rand() % 1000) == 0 )
if ( (rand() % 10000) == 0 )
{
post = 0;
LP_listunspent_both(coin->symbol,coin->smartaddr);
@ -700,7 +700,8 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
if ( LP_mainloop_iter(ctx,myipaddr,mypeer,pubsock,pushaddr,myport) != 0 )
nonz++;
if ( nonz == 0 )
usleep(1000000 / MAINLOOP_PERSEC);
usleep(100000);
else usleep(10000);
}
}

Loading…
Cancel
Save