From 8f86ea959bbb3ba31c6e2f9e6e08e7de7152da50 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 18 Jan 2016 05:38:30 -0300 Subject: [PATCH] test --- iguana/SuperNET.c | 4 ++-- iguana/iguana_peers.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iguana/SuperNET.c b/iguana/SuperNET.c index eac72dd22..167a22925 100644 --- a/iguana/SuperNET.c +++ b/iguana/SuperNET.c @@ -291,7 +291,7 @@ char *SuperNET_DHTsend(struct supernet_info *myinfo,bits256 routehash,char *hexm lastpurge = 0; } mydist = DHT_dist(packethash,myinfo->myaddr.iphash); - for (iter=0; iter<2; iter++) + for (iter=broadcastflag!=0; iter<2; iter++) { for (i=0; iiphash) < mydist ) + //if ( DHT_dist(packethash,addr->iphash) < mydist ) { iguana_send_supernet(Coins[i],addr,jsonstr,maxdelay==0?0:rand()%maxdelay); n++; diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index e6996699d..816f94e7d 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -386,7 +386,7 @@ int32_t iguana_send(struct iguana_info *coin,struct iguana_peer *addr,uint8_t *s } } addr->totalsent += len; - //printf(" %s sent.%d bytes to %s\n",(char *)&serialized[4],len,addr->ipaddr);// getchar(); + printf(" %s sent.%d bytes to %s\n",(char *)&serialized[4],len,addr->ipaddr);// getchar(); return(len); } @@ -488,7 +488,7 @@ void _iguana_processmsg(struct iguana_info *coin,int32_t usock,struct iguana_pee memset(&H,0,sizeof(H)); if ( (recvlen= (int32_t)iguana_recv(addr->ipaddr,usock,(uint8_t *)&H,sizeof(H))) == sizeof(H) ) { - //printf("%p got.(%s) recvlen.%d from %s | usock.%d ready.%u dead.%u\n",addr,H.command,recvlen,addr->ipaddr,addr->usock,addr->ready,addr->dead); + printf("%p got.(%s) recvlen.%d from %s | usock.%d ready.%u dead.%u\n",addr,H.command,recvlen,addr->ipaddr,addr->usock,addr->ready,addr->dead); if ( coin->peers.shuttingdown != 0 || addr->dead != 0 ) return; if ( (len= iguana_validatehdr(&H)) >= 0 )