Browse Source

Test

etomic
jl777 7 years ago
parent
commit
a9763f0b7e
  1. 4
      iguana/exchanges/LP_nativeDEX.c
  2. 3
      iguana/exchanges/LP_signatures.c

4
iguana/exchanges/LP_nativeDEX.c

@ -711,7 +711,7 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint
int32_t i,j; uint32_t r;
if ( IAMLP != 0 )
{
LP_mypeer = mypeer = LP_addpeer(mypeer,pubsock,myipaddr,myport,0,0,0,G.LP_sessionid);
LP_mypeer = mypeer = LP_addpeer(mypeer,pubsock,myipaddr,myport,0,0,1,G.LP_sessionid);
if ( myipaddr == 0 || mypeer == 0 )
{
printf("couldnt get myipaddr or null mypeer.%p\n",mypeer);
@ -768,7 +768,7 @@ void LP_pubkeysloop(void *ctx)
}
if ( time(NULL) > lasttime+LP_ORDERBOOK_DURATION*0.5 )
{
//printf("LP_pubkeysloop %u\n",(uint32_t)time(NULL));
printf("LP_pubkeysloop %u\n",(uint32_t)time(NULL));
LP_notify_pubkeys(ctx,LP_mypubsock);
lasttime = (uint32_t)time(NULL);
}

3
iguana/exchanges/LP_signatures.c

@ -584,7 +584,10 @@ char *LP_notify_recv(cJSON *argjson)
if ( (pubp= LP_pubkeyadd(pub)) != 0 )
LP_pubkey_sigcheck(pubp,argjson);
if ( (ipaddr= jstr(argjson,"isLP")) != 0 )
{
printf("notify from isLP %s\n",ipaddr);
LP_addpeer(LP_mypeer,LP_mypubsock,ipaddr,RPC_port,RPC_port+10,RPC_port+20,1,juint(argjson,"session"));
}
//char str[65]; printf("%.3f NOTIFIED pub %s rmd160 %s\n",OS_milliseconds()-millis,bits256_str(str,pub),rmd160str);
}
return(clonestr("{\"result\":\"success\",\"notify\":\"received\"}"));

Loading…
Cancel
Save