|
@ -604,8 +604,8 @@ char *SuperNET_JSON(struct supernet_info *myinfo,cJSON *json,char *remoteaddr) |
|
|
|
|
|
|
|
|
char *SuperNET_p2p(struct iguana_info *coin,struct iguana_peer *addr,int32_t *delaymillisp,char *ipaddr,uint8_t *data,int32_t datalen,int32_t compressed) |
|
|
char *SuperNET_p2p(struct iguana_info *coin,struct iguana_peer *addr,int32_t *delaymillisp,char *ipaddr,uint8_t *data,int32_t datalen,int32_t compressed) |
|
|
{ |
|
|
{ |
|
|
struct supernet_info *myinfo;char *myipaddr,*method,*retstr,*checkstr; void *ptr=0; |
|
|
struct supernet_info *myinfo; char *hexmsg,*myipaddr,*method,*retstr,*checkstr; void *ptr=0; |
|
|
bits256 senderpub,privkey,pubkey,nextprivkey,nextpubkey,nextdestpub; uint16_t checkc,othercheckc; |
|
|
bits256 senderpub,privkey,pubkey,nextprivkey,nextpubkey,nextdestpub,destpub; uint16_t checkc,othercheckc; |
|
|
cJSON *json,*retjson; int32_t offset,maxdelay,msglen = datalen; uint8_t space[8192],*msgbits = 0; |
|
|
cJSON *json,*retjson; int32_t offset,maxdelay,msglen = datalen; uint8_t space[8192],*msgbits = 0; |
|
|
myinfo = SuperNET_MYINFO(0); |
|
|
myinfo = SuperNET_MYINFO(0); |
|
|
retstr = 0; |
|
|
retstr = 0; |
|
@ -666,6 +666,9 @@ char *SuperNET_p2p(struct iguana_info *coin,struct iguana_peer *addr,int32_t *de |
|
|
return(0); |
|
|
return(0); |
|
|
} |
|
|
} |
|
|
retstr = SuperNET_JSON(myinfo,json,ipaddr); |
|
|
retstr = SuperNET_JSON(myinfo,json,ipaddr); |
|
|
|
|
|
destpub = jbits256(json,"destpub"); |
|
|
|
|
|
if ( 0 && (hexmsg= jstr(json,"hexmsg")) != 0 && SuperNET_hexmsgfind(myinfo,destpub,hexmsg,0) < 0 ) |
|
|
|
|
|
SuperNET_hexmsgadd(myinfo,destpub,hexmsg,tai_now()); |
|
|
//printf("p2pret.(%s)\n",retstr);
|
|
|
//printf("p2pret.(%s)\n",retstr);
|
|
|
*delaymillisp = SuperNET_delaymillis(myinfo,maxdelay); |
|
|
*delaymillisp = SuperNET_delaymillis(myinfo,maxdelay); |
|
|
senderpub = jbits256(json,"mypub"); |
|
|
senderpub = jbits256(json,"mypub"); |
|
|