Browse Source

Test

etomic
jl777 7 years ago
parent
commit
51bb7a2ab3
  1. 2
      iguana/exchanges/LP_nativeDEX.c
  2. 2
      iguana/exchanges/LP_network.c
  3. 10
      iguana/exchanges/LP_signatures.c

2
iguana/exchanges/LP_nativeDEX.c

@ -121,7 +121,7 @@ struct LP_globals
uint64_t LP_skipstatus[10000];
uint8_t LP_myrmd160[20],LP_pubsecp[33];
uint32_t LP_sessionid,counter;
int32_t LP_pendingswaps,USERPASS_COUNTER,LP_numprivkeys,initializing,waiting,LP_numskips;
int32_t LP_IAMLP,LP_pendingswaps,USERPASS_COUNTER,LP_numprivkeys,initializing,waiting,LP_numskips;
char USERPASS[65],USERPASS_WIFSTR[64],LP_myrmd160str[41],gui[16];
struct LP_privkey LP_privkeys[100];
} G;

2
iguana/exchanges/LP_network.c

@ -408,7 +408,7 @@ void LP_broadcast_finish(int32_t pubsock,char *base,char *rel,uint8_t *msg,cJSON
msglen = (int32_t)strlen((char *)msg) + 1;
if ( crc32 == 0 )
crc32 = calc_crc32(0,&msg[2],msglen - 2);
if ( IAMLP == 0 )
if ( G.LP_IAMLP == 0 )
{
free(msg);
//printf("broadcast %s\n",jstr(argjson,"method"));

10
iguana/exchanges/LP_signatures.c

@ -589,7 +589,15 @@ char *LP_notify_recv(cJSON *argjson)
LP_pubkey_sigcheck(pubp,argjson);
if ( (ipaddr= jstr(argjson,"isLP")) != 0 )
{
//printf("notify from isLP %s\n",ipaddr);
printf("notify got isLP %s\n",ipaddr);
if ( strcmp(ipaddr,LP_myipaddr) == 0 )
{
if ( bits256_cmp(pub,G.LP_mypub25519) != 0 )
{
char str[65]; printf("that's me! and it is from %s which isnt me\n",bits256_str(str,pub));
G.LP_IAMLP = 1;
}
}
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);

Loading…
Cancel
Save