Browse Source

Test

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

5
iguana/exchanges/LP_commands.c

@ -52,6 +52,11 @@ char *stats_JSON(char *myipaddr,int32_t pubsock,double profitmargin,cJSON *argjs
}
if ( strcmp(method,"hello") == 0 )
return(0);
else if ( strcmp(method,"nn_tests") == 0 )
{
LP_send(pubsock,"nn_test return",0);
return(0);
}
else if ( strcmp(method,"help") == 0 )
return(clonestr("{\"result\":\" \
available localhost RPC commands:\n \

2
iguana/exchanges/LP_nativeDEX.c

@ -359,7 +359,7 @@ void nn_tests(int32_t pullsock,char *pushaddr)
nn_setsockopt(sock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout));
timeout = 1000;
nn_setsockopt(sock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));
n = nn_send(sock,"nn_tests",(int32_t)strlen("nn_tests")+1,0);
n = nn_send(sock,"{\"method\":\"nn_tests\"}",(int32_t)strlen("{\"method\":\"nn_tests\"}")+1,0);
LP_pullsock_check("127.0.0.1",-1,pullsock,0.);
// n = LP_send(sock,"nn_tests",0);
printf("sent %d bytes\n",n);

Loading…
Cancel
Save