Browse Source

Test

etomic
jl777 7 years ago
parent
commit
99195b78c4
  1. 1
      iguana/exchanges/LP_peers.c
  2. 9
      iguana/exchanges/LP_signatures.c

1
iguana/exchanges/LP_peers.c

@ -87,6 +87,7 @@ struct LP_peerinfo *LP_addpeer(struct LP_peerinfo *mypeer,int32_t mypubsock,char
strcpy(peer->ipaddr,ipaddr);
//peer->profitmargin = profitmargin;
peer->ipbits = ipbits;
peer->isLP = isLP;
peer->port = port;
peer->ip_port = ((uint64_t)port << 32) | ipbits;
if ( pushport != 0 && subport != 0 && (pushsock= nn_socket(AF_SP,NN_PUSH)) >= 0 )

9
iguana/exchanges/LP_signatures.c

@ -571,12 +571,9 @@ void LP_notify_pubkeys(void *ctx,int32_t pubsock)
LP_pubkey_sigadd(reqjson,timestamp,G.LP_privkey,G.LP_mypub25519,G.LP_myrmd160,G.LP_pubsecp);
if ( IAMLP != 0 )
{
if ( (rand() % 2) == 0 )
LP_randpeer(LPipaddr);
else strcpy(LPipaddr,LP_myipaddr);
if ( LPipaddr[0] == 0 )
strcpy(LPipaddr,LP_myipaddr);
jaddstr(reqjson,"isLP",LPipaddr);
if ( LP_randpeer(LPipaddr) != 0 )
jaddstr(reqjson,"isLP",LPipaddr);
else printf("no LPipaddr\n");
}
jaddnum(reqjson,"session",G.LP_sessionid);
LP_reserved_msg(0,"","",zero,jprint(reqjson,1));

Loading…
Cancel
Save