|
|
@ -764,7 +764,7 @@ char *SuperNET_p2p(struct iguana_info *coin,struct iguana_peer *addr,int32_t *de |
|
|
|
// printf("%02x ",data[i]);
|
|
|
|
//printf("DECRYPT %d\n",datalen);
|
|
|
|
iguana_setkeys(myinfo,addr,&privkey,&pubkey,&senderpub,&nextprivkey,&nextpubkey,&nextdestpub); |
|
|
|
senderpub = iguana_actualpubkey(&offset,data,datalen,senderpub); |
|
|
|
iguana_actualpubkey(&offset,data,datalen,senderpub); |
|
|
|
if ( (msgbits= SuperNET_deciphercalc(&ptr,&msglen,privkey,senderpub,data+offset,datalen-offset,space,sizeof(space))) == 0 ) |
|
|
|
{ |
|
|
|
if ( (msgbits= SuperNET_deciphercalc(&ptr,&msglen,GENESIS_PRIVKEY,GENESIS_PUBKEY,data+offset,datalen-offset,space,sizeof(space))) == 0 ) |
|
|
@ -798,7 +798,7 @@ char *SuperNET_p2p(struct iguana_info *coin,struct iguana_peer *addr,int32_t *de |
|
|
|
//printf("validpub.%d: %x vs %x shared.%llx\n",addr->validpub,checkc,othercheckc,(long long)addr->sharedseed.txid);
|
|
|
|
} |
|
|
|
maxdelay = juint(json,"maxdelay"); |
|
|
|
//if ( 1 && jstr(json,"method") != 0 && strcmp(jstr(json,"method"),"getpeers") != 0 )
|
|
|
|
if ( 1 && jstr(json,"method") != 0 && strcmp(jstr(json,"method"),"getpeers") != 0 ) |
|
|
|
printf("GOT >>>>>>>> SUPERNET P2P.(%s) from.%s %s valid.%d:%d\n",jprint(json,0),coin->symbol,addr->ipaddr,addr->validpub,addr->othervalid); |
|
|
|
if ( (myipaddr= jstr(json,"yourip")) != 0 ) |
|
|
|
SuperNET_checkipaddr(SuperNET_MYINFO(0),coin,addr,myipaddr,ipaddr); |
|
|
@ -815,7 +815,7 @@ char *SuperNET_p2p(struct iguana_info *coin,struct iguana_peer *addr,int32_t *de |
|
|
|
return(0); |
|
|
|
} |
|
|
|
retstr = SuperNET_JSON(myinfo,json,ipaddr,addr->A.port); |
|
|
|
//printf("p2pret.(%s)\n",retstr);
|
|
|
|
printf("p2pret.(%s)\n",retstr); |
|
|
|
*delaymillisp = SuperNET_delaymillis(myinfo,maxdelay); |
|
|
|
senderpub = jbits256(json,"mypub"); |
|
|
|
addr->othervalid = (int32_t)jdouble(json,"ov"); |
|
|
|