Browse Source

Test

etomic
jl777 7 years ago
parent
commit
5678a7c43b
  1. 5
      iguana/exchanges/LP_socket.c
  2. 9
      iguana/exchanges/mm.c

5
iguana/exchanges/LP_socket.c

@ -362,10 +362,9 @@ int32_t LP_recvfunc(struct electrum_info *ep,char *str,int32_t len)
return(item != 0);
}
void LP_dedicatedloop(char *symbol,char *ipaddr,uint16_t port)
void LP_dedicatedloop(void *arg)
{
struct pollfd fds; int32_t i,len,flag,timeout = 10; struct stritem *sitem; struct electrum_info *ep;
ep = LP_electrum_info(symbol,ipaddr,port,IGUANA_MAXPACKETSIZE * 10);
struct pollfd fds; int32_t i,len,flag,timeout = 10; struct stritem *sitem; struct electrum_info *ep = arg;
printf("ep.%p for %s:%u num.%d\n",ep,ep->ipaddr,ep->port,Num_electrums);
while ( ep->sock >= 0 )
{

9
iguana/exchanges/mm.c

@ -799,12 +799,17 @@ void LP_main(void *ptr)
int main(int argc, const char * argv[])
{
char dirname[512],*base,*rel,*name,*exchange,*apikey,*apisecret,*blocktrail,*retstr,*baseaddr,*reladdr,*passphrase;
char dirname[512],*base,*rel,*name,*exchange,*apikey,*apisecret,*blocktrail,*retstr,*baseaddr,*reladdr,*passphrase; struct electrum_info *ep;
double profitmargin,maxexposure,incrratio,start_rel,start_base,minask,maxbid,incr;
cJSON *retjson,*loginjson; int32_t i;
OS_init();
ep = LP_electrum_info("BTC","46.4.125.2",50001,IGUANA_MAXPACKETSIZE * 10); //88.198.241.196"
if ( ep != 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)LP_dedicatedloop,(void *)ep) != 0 )
{
printf("error launching LP_main (%s)\n",jprint(retjson,0));
exit(-1);
} else printf("(%s) launched.(%s)\n",argv[1],passphrase);
printf("call test\n");
LP_dedicatedloop("BTC","46.4.125.2",50001);//88.198.241.196",50001);
if ( (1) )
{
electrum_test();

Loading…
Cancel
Save