From e711049a304b1310381659e63b34957237124c65 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 30 Aug 2016 02:54:43 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 6 +++--- iguana/iguana777.c | 2 ++ iguana/iguana_init.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index 28c7e5855..a0f282877 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -149,7 +149,7 @@ int32_t basilisk_sendcmd(struct supernet_info *myinfo,char *destipaddr,char *typ { int32_t i,r,l,s,valid,val,n=0,retval = -1; char cmd[12]; struct iguana_info *coin,*tmp; struct iguana_peer *addr; bits256 hash; uint32_t *alreadysent; if ( fanout <= 0 ) - fanout = sqrt(myinfo->numrelays) + 1; + fanout = sqrt(myinfo->numrelays) + 2; else if ( fanout > BASILISK_MAXFANOUT ) fanout = BASILISK_MAXFANOUT; if ( type == 0 ) @@ -358,7 +358,7 @@ struct basilisk_item *basilisk_requestservice(struct supernet_info *myinfo,struc numrequired = 1; if ( (timeoutmillis= jint(valsobj,"timeout")) == 0 ) timeoutmillis = BASILISK_TIMEOUT; - minfanout = sqrt(myinfo->numrelays)+1; + minfanout = sqrt(myinfo->numrelays)+2; if ( jobj(valsobj,"fanout") == 0 ) fanout = minfanout; else fanout = jint(valsobj,"fanout"); @@ -887,7 +887,7 @@ HASH_ARRAY_STRING(basilisk,balances,hash,vals,hexstr) coin = iguana_coinfind(symbol); } if ( jobj(vals,"fanout") == 0 ) - jaddnum(vals,"fanout",(int32_t)sqrt(myinfo->numrelays)+1); + jaddnum(vals,"fanout",(int32_t)sqrt(myinfo->numrelays)+2); if ( jobj(vals,"numrequired") == 0 ) jaddnum(vals,"numrequired",myinfo->numrelays); if ( coin != 0 ) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 0102b07f3..cb70c830d 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -810,6 +810,8 @@ void iguana_coinloop(void *arg) //if ( saved++ == 0 ) // iguana_coinflush(coin,1); }*/ + if ( myinfo->RELAYID >= 0 ) + continue; if ( coin->bindsock >= 0 ) { if ( coin->MAXPEERS > 1 && coin->peers->numranked < IGUANA_MAXPEERS/2 && now > coin->lastpossible+2 ) diff --git a/iguana/iguana_init.c b/iguana/iguana_init.c index 334c03e3a..59c925c16 100755 --- a/iguana/iguana_init.c +++ b/iguana/iguana_init.c @@ -289,7 +289,7 @@ void iguana_parseline(struct supernet_info *myinfo,struct iguana_info *coin,int3 //printf("parse line.(%s) maxpeers.%d\n",line,coin->MAXPEERS); if ( iter == 0 ) { - if ( m < coin->MAXPEERS/2 )//&& m < 77.7 ) + if ( m < 32 && (m < coin->MAXPEERS/2 && strcmp("BTCD",coin->symbol) != 0) )//&& m < 77.7 ) { if ( 0 && m == 0 ) {