|
|
@ -26,14 +26,15 @@ |
|
|
|
|
|
|
|
struct iguana_peer *basilisk_ensurerelay(struct supernet_info *myinfo,struct iguana_info *notaries,uint32_t ipbits) |
|
|
|
{ |
|
|
|
struct iguana_peer *addr; int32_t i; |
|
|
|
struct iguana_peer *addr; int32_t i; char ipaddr[64]; |
|
|
|
expand_ipbits(ipaddr,ipbits); |
|
|
|
if ( notaries == 0 || ipbits == myinfo->myaddr.myipbits ) |
|
|
|
return(0); |
|
|
|
if ( (addr= iguana_peerfindipbits(notaries,ipbits,0)) == 0 ) |
|
|
|
{ |
|
|
|
if ( (addr= iguana_peerslot(notaries,ipbits,0)) != 0 ) |
|
|
|
{ |
|
|
|
printf("launch peer for relay\n"); |
|
|
|
printf("launch peer.%s for relay vs (%s)\n",ipaddr,myinfo->ipaddr); |
|
|
|
addr->isrelay = 1; |
|
|
|
myinfo->NOTARY.RELAYID = -1; |
|
|
|
for (i=0; i<myinfo->NOTARY.NUMRELAYS; i++) |
|
|
|