Browse Source

Test

etomic
jl777 7 years ago
parent
commit
5843dafb78
  1. 5
      iguana/exchanges/LP_commands.c
  2. 4
      iguana/exchanges/LP_nativeDEX.c
  3. 1
      iguana/exchanges/stats.c

5
iguana/exchanges/LP_commands.c

@ -375,7 +375,10 @@ bot_resume(botid)\n\
if ( (ptr= LP_coinsearch(coin)) != 0 ) if ( (ptr= LP_coinsearch(coin)) != 0 )
{ {
ptr->inactive = 0; ptr->inactive = 0;
return(jprint(LP_electrumserver(ptr,jstr(argjson,"ipaddr"),juint(argjson,"port")),1)); retstr = jprint(LP_electrumserver(ptr,jstr(argjson,"ipaddr"),juint(argjson,"port")),1);
if ( ptr->electrum != 0 && (retjson= electrum_address_listunspent(ptr->symbol,ptr->electrum,&retjson,ptr->smartaddr,2)) != 0 )
free_json(retjson);
return(retstr);
} else return(clonestr("{\"error\":\"cant find coind\"}")); } else return(clonestr("{\"error\":\"cant find coind\"}"));
} }
else if ( strcmp(method,"sendrawtransaction") == 0 ) else if ( strcmp(method,"sendrawtransaction") == 0 )

4
iguana/exchanges/LP_nativeDEX.c

@ -1179,13 +1179,13 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
usleep(1000); usleep(1000);
else if ( IAMLP == 0 ) else if ( IAMLP == 0 )
usleep(1000); usleep(1000);
if ( (rand() % 10000) == 0 ) /*if ( (rand() % 1000) == 0 )
{ {
int32_t sock = LP_bindsock; int32_t sock = LP_bindsock;
printf("bindsock reset test\n"); printf("bindsock reset test\n");
LP_bindsock = -1; LP_bindsock = -1;
closesocket(sock); closesocket(sock);
} }*/
} }
#endif #endif
} }

1
iguana/exchanges/stats.c

@ -751,6 +751,7 @@ void stats_rpcloop(void *args)
localhostbits = (uint32_t)calc_ipbits("127.0.0.1"); localhostbits = (uint32_t)calc_ipbits("127.0.0.1");
while ( 1 ) while ( 1 )
{ {
printf("LP_bindsock.%d\n",LP_bindsock);
if ( LP_bindsock < 0 ) if ( LP_bindsock < 0 )
{ {
while ( (LP_bindsock= iguana_socket(1,"0.0.0.0",port)) < 0 ) while ( (LP_bindsock= iguana_socket(1,"0.0.0.0",port)) < 0 )

Loading…
Cancel
Save