Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
8f86ea959b
  1. 4
      iguana/SuperNET.c
  2. 4
      iguana/iguana_peers.c

4
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; i<IGUANA_MAXCOINS; i++)
{
@ -310,7 +310,7 @@ char *SuperNET_DHTsend(struct supernet_info *myinfo,bits256 routehash,char *hexm
}
else if ( iter == 1 )
{
if ( DHT_dist(packethash,addr->iphash) < mydist )
//if ( DHT_dist(packethash,addr->iphash) < mydist )
{
iguana_send_supernet(Coins[i],addr,jsonstr,maxdelay==0?0:rand()%maxdelay);
n++;

4
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 )

Loading…
Cancel
Save