Browse Source

Fix LP propagation

dev
jl777 7 years ago
parent
commit
8dc68d3716
  1. 4
      iguana/exchanges/LP_nativeDEX.c
  2. 4
      iguana/exchanges/LP_signatures.c

4
iguana/exchanges/LP_nativeDEX.c

@ -911,9 +911,9 @@ void LP_pubkeysloop(void *ctx)
if ( strcmp(G.USERPASS,"1d8b27b21efabcd96571cd56f91a40fb9aa4cc623d273c63bf9223dc6f8cd81f") != 0 )
{
LP_millistats_update(&LP_pubkeysloop_stats);
if ( time(NULL) > lasttime+60 )
if ( time(NULL) > lasttime+100 )
{
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);
}

4
iguana/exchanges/LP_signatures.c

@ -543,7 +543,7 @@ void LP_notify_pubkeys(void *ctx,int32_t pubsock)
jaddstr(reqjson,"isLP",LPipaddr);
if ( strcmp(LPipaddr,LP_myipaddr) == 0 )
jaddnum(reqjson,"ismine",1);
printf("notify send isLP.%s ismine.%d\n",LPipaddr,strcmp(LPipaddr,LP_myipaddr) == 0);
//printf("notify send isLP.%s ismine.%d\n",LPipaddr,strcmp(LPipaddr,LP_myipaddr) == 0);
} else printf("no LPipaddr\n");
}
jaddnum(reqjson,"session",G.LP_sessionid);
@ -560,7 +560,7 @@ char *LP_notify_recv(cJSON *argjson)
LP_pubkey_sigcheck(pubp,argjson);
if ( (ipaddr= jstr(argjson,"isLP")) != 0 )
{
printf("notify got isLP %s %d\n",ipaddr,jint(argjson,"ismine"));
//printf("notify got isLP %s %d\n",ipaddr,jint(argjson,"ismine"));
LP_peer_recv(ipaddr,jint(argjson,"ismine"));
if ( IAMLP != 0 && G.LP_IAMLP == 0 && strcmp(ipaddr,LP_myipaddr) == 0 )
{

Loading…
Cancel
Save