Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
e53e259091
  1. 2
      iguana/SuperNET.c
  2. 3
      iguana/iguana_instantdex.c
  3. 3
      iguana/iguana_peers.c

2
iguana/SuperNET.c

@ -789,7 +789,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 ( 0 && 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);

3
iguana/iguana_instantdex.c

@ -370,7 +370,8 @@ char *instantdex_sendcmd(struct supernet_info *myinfo,struct instantdex_offer *o
j = (i + r) % max;
if ( (addr= coin->peers.ranked[j]) != 0 && addr->supernet != 0 && addr->usock >= 0 )
{
iguana_queue_send(coin,addr,0,serialized,"InstantDEX",msg->sig.allocsize,0,0);
printf("send to (%s)\n",addr->ipaddr);
iguana_queue_send(coin,addr,0,serialized,"InstantDEX",msg->sig.allocsize,0,1);
if ( --hops <= 0 )
break;
}

3
iguana/iguana_peers.c

@ -464,6 +464,9 @@ int32_t iguana_queue_send(struct iguana_info *coin,struct iguana_peer *addr,int3
exit(-1);
return(-1);
}
else if ( forceflag != 0 )
return(iguana_send(coin,addr,serialized,len));
if ( (datalen= iguana_sethdr((void *)serialized,coin->chain->netmagic,cmd,&serialized[sizeof(struct iguana_msghdr)],len)) < 0 )
return(-1);
if ( strcmp("getaddr",cmd) == 0 && time(NULL) < addr->lastgotaddr+300 )

Loading…
Cancel
Save