Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
de56477f92
  1. 2
      basilisk/basilisk_MSG.c
  2. 4
      basilisk/basilisk_bitcoin.c
  3. 6
      basilisk/basilisk_ping.c

2
basilisk/basilisk_MSG.c

@ -174,7 +174,7 @@ HASH_ARRAY_STRING(basilisk,sendmessage,hash,vals,hexstr)
free(retstr);
}
if ( vals != 0 )
jaddnum(vals,"fanout",BASILISK_MAXFANOUT);
jaddnum(vals,"fanout",(int32_t)sqrt(myinfo->numrelays));
return(basilisk_standardservice("OUT",myinfo,0,hash,vals,hexstr,0));
}
#include "../includes/iguana_apiundefs.h"

4
basilisk/basilisk_bitcoin.c

@ -791,7 +791,7 @@ HASH_ARRAY_STRING(basilisk,value,hash,vals,hexstr)
coin = iguana_coinfind(symbol);
}
if ( jobj(vals,"fanout") == 0 )
jaddnum(vals,"fanout",8);
jaddnum(vals,"fanout",(int32_t)sqrt(myinfo->numrelays));
if ( coin != 0 )
{
if ( (basilisktag= juint(vals,"basilisktag")) == 0 )
@ -819,7 +819,7 @@ HASH_ARRAY_STRING(basilisk,value,hash,vals,hexstr)
if ( jobj(vals,"numrequired") == 0 )
jaddnum(vals,"numrequired",myinfo->numrelays);
if ( jobj(vals,"fanout") == 0 )
jaddnum(vals,"fanout",8);
jaddnum(vals,"fanout",(int32_t)sqrt(myinfo->numrelays));
if ( coin != 0 )
{
if ( juint(vals,"burn") == 0 )

6
basilisk/basilisk_ping.c

@ -242,8 +242,7 @@ void basilisk_ping_process(struct supernet_info *myinfo,struct iguana_peer *addr
//len += basilisk_ping_processDEX(myinfo,senderipbits,&data[len],datalen-len);
len += basilisk_ping_processMSG(myinfo,senderipbits,&data[len],datalen-len);
}
if ( len+1 != datalen )
printf("PING got %d, processed.%d from (%s)\n",datalen,len,ipbuf);
//printf("PING got %d, processed.%d from (%s)\n",datalen,len,ipbuf);
//else printf("\n");
//for (i=0; i<datalen; i++)
// printf("%02x",data[i]);
@ -291,7 +290,8 @@ void basilisk_ping_send(struct supernet_info *myinfo,struct iguana_info *btcd)
{
if ( iguana_queue_send(addr,0,myinfo->pingbuf,"SuperNETPIN",datalen) <= 0 )
printf("error sending %d to (%s)\n",datalen,addr->ipaddr);
//else printf("+(%s) ",addr->ipaddr);
else if ( datalen > 200 )
printf("+(%s) ",addr->ipaddr);
} //else printf("-(%s) ",ipaddr);
}
//printf("my RELAYID.%d of %d\n",myinfo->RELAYID,myinfo->numrelays);

Loading…
Cancel
Save