diff --git a/iguana/SuperNET.c b/iguana/SuperNET.c index 48e08a623..033c0b744 100644 --- a/iguana/SuperNET.c +++ b/iguana/SuperNET.c @@ -169,7 +169,7 @@ cJSON *SuperNET_bits2json(struct supernet_info *myinfo,bits256 senderpub,bits256 int32_t numbits,iter,flag=0,len = 0; uint32_t crc,checkcrc; cJSON *json = cJSON_CreateObject(); int32_t i; for (i=0; ivalidpub,checkc,othercheckc); if ( checkc == othercheckc ) { if ( addr->validpub++ > 1 ) addr->sharedseed = SuperNET_sharedseed(myinfo,senderpub); } else addr->validpub = 0; + printf("validpub.%d: %x vs %x shared.%llx\n",addr->validpub,checkc,othercheckc,(long long)addr->sharedseed.txid); } maxdelay = juint(json,"maxdelay"); printf("GOT >>>>>>>> SUPERNET P2P.(%s) from.%s\n",jprint(json,0),coin->symbol); diff --git a/iguana/SuperNET.h b/iguana/SuperNET.h index 93d1a977b..b5e5b4193 100644 --- a/iguana/SuperNET.h +++ b/iguana/SuperNET.h @@ -31,6 +31,7 @@ #define nn_errstr() nn_strerror(nn_errno()) #define MAX_SERVERNAME 128 #define SUPERNET_MAXRECVBUF (1024 * 1024 * 16) +#define SUPERNET_PINGGAP 6 #define SUPERNET_FORWARD 2 #define SUPERNET_ISMINE 1 diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index ad567f23d..747f7df7b 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -1000,7 +1000,7 @@ void iguana_dedicatedloop(struct iguana_info *coin,struct iguana_peer *addr) } if ( flag != 0 ) run = 0; - else if ( addr->supernet != 0 && time(NULL) > lastping+60 ) + else if ( addr->supernet != 0 && time(NULL) > lastping+SUPERNET_PINGGAP ) { iguana_send_supernet(coin,addr,"{\"agent\":\"SuperNET\",\"method\":\"getpeers\"}",0); lastping = (uint32_t)time(NULL);