diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index 98f222e72..05a25bfae 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -367,6 +367,8 @@ struct basilisk_item *basilisk_requestservice(struct supernet_info *myinfo,struc if ( (timeoutmillis= jint(valsobj,"timeout")) == 0 ) timeoutmillis = BASILISK_TIMEOUT; minfanout = sqrt(NUMRELAYS)+1; + if ( minfanout < 5 ) + minfanout = 5; if ( jobj(valsobj,"fanout") == 0 ) fanout = minfanout; else fanout = jint(valsobj,"fanout"); diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 259c5f0dd..0d4de9c20 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -857,7 +857,7 @@ void iguana_coinloop(void *arg) addr = &coin->peers->active[(i+j) % IGUANA_MAXPEERS]; if ( addr->usock >= 0 && addr->msgcounts.verack == 0 ) { - printf("i.%d j.%d mainloop %s\n",i,j,addr->ipaddr); + //printf("i.%d j.%d mainloop %s\n",i,j,addr->ipaddr); iguana_send_version(coin,addr,coin->myservices); break; } diff --git a/iguana/iguana_msg.c b/iguana/iguana_msg.c index 17eaec75c..b31447698 100755 --- a/iguana/iguana_msg.c +++ b/iguana/iguana_msg.c @@ -350,7 +350,7 @@ int32_t iguana_send_version(struct iguana_info *coin,struct iguana_peer *addr,ui if ( coin->FULLNODE != 0 || coin->VALIDATENODE != 0 ) sprintf(msg.strSubVer,"/iguana 0.00/"); else sprintf(msg.strSubVer,"/basilisk 0.00/"); - printf("SEND.(%s) -> (%s)\n",msg.strSubVer,addr->ipaddr); + //printf("SEND.(%s) -> (%s)\n",msg.strSubVer,addr->ipaddr); //sprintf(msg.strSubVer,"/Satoshi:0.10.0/"); msg.nStartingHeight = coin->blocks.hwmchain.height; iguana_gotdata(coin,addr,msg.nStartingHeight); diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index 15067238b..d311ccb33 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -484,7 +484,7 @@ int32_t iguana_send(struct iguana_info *coin,struct iguana_peer *addr,uint8_t *s printf("skip.(%s) since no verack yet\n",cmdstr); return(-1); } - printf("%s -> %s\n",cmdstr,addr->ipaddr); + //printf("%s -> %s\n",cmdstr,addr->ipaddr); if ( strcmp(cmdstr,"ping") == 0 ) addr->sendmillis = OS_milliseconds(); if ( len > IGUANA_MAXPACKETSIZE ) @@ -517,7 +517,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",cmdstr,len,addr->ipaddr); + printf("verack.%d (%s) sent.%d bytes to %s\n",addr->msgcounts.verack,cmdstr,len,addr->ipaddr); return(len); } @@ -545,7 +545,7 @@ int32_t iguana_queue_send(struct iguana_peer *addr,int32_t delay,uint8_t *serial packet->embargo.millis += delay; } memcpy(packet->serialized,serialized,datalen); - printf("%p queue send.(%s) %d to (%s)\n",packet,serialized+4,datalen,addr->ipaddr); + //printf("%p queue send.(%s) %d to (%s)\n",packet,serialized+4,datalen,addr->ipaddr); queue_enqueue("sendQ",&addr->sendQ,&packet->DL,0); return(datalen); } diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index 4059a45f4..8e9200b6d 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -1307,7 +1307,7 @@ int32_t iguana_bundleremove(struct iguana_info *coin,int32_t hdrsi,int32_t tmpfi struct iguana_bundle *bp; int32_t i; char fname[1024],str[65]; if ( hdrsi >= 0 && hdrsi < coin->bundlescount && (bp= coin->bundles[hdrsi]) != 0 ) { - printf("delete bundle.[%d]\n",hdrsi); + printf("%s delete bundle.[%d]\n",coin->symbol,hdrsi); if ( tmpfiles != 0 ) { for (i=0; in; i++) diff --git a/iguana/iguana_spendvectors.c b/iguana/iguana_spendvectors.c index 7621f4bf2..456317691 100755 --- a/iguana/iguana_spendvectors.c +++ b/iguana/iguana_spendvectors.c @@ -1158,7 +1158,7 @@ int32_t iguana_bundlevalidate(struct supernet_info *myinfo,struct iguana_info *c } // else printf("skip validate.[%d] validated.%u force.%d\n",bp->hdrsi,bp->validated,forceflag); if ( errs != 0 ) { - printf("remove.[%d]\n",bp->hdrsi); + printf("%s remove.[%d]\n",coin->symbol,bp->hdrsi); iguana_bundleremove(coin,bp->hdrsi,0); } return(bp->n - errs); diff --git a/iguana/iguana_tx.c b/iguana/iguana_tx.c index 246c4b79c..aafe3de31 100755 --- a/iguana/iguana_tx.c +++ b/iguana/iguana_tx.c @@ -157,7 +157,7 @@ struct iguana_txid *iguana_blocktx(struct iguana_info *coin,struct iguana_txid * return(0); } else printf("iguana_blocktx null txidind [%d:%d] i.%d\n",block->hdrsi,block->bundlei,i); } else printf("iguana_blocktx no bp.[%d]\n",block->hdrsi); - } else printf("blocktx illegal height.%d\n",block->height); + } else printf("%s blocktx illegal height.%d\n",coin->symbol,block->height); } else printf("i.%d vs txn_count.%d\n",i,block->RO.txn_count); return(0); } @@ -266,7 +266,7 @@ int32_t iguana_peerblockrequest(struct supernet_info *myinfo,struct iguana_info } else { - printf("null tx error getting txi.%d [%d:%d]\n",i,bp->hdrsi,bundlei); + printf("%s null tx error getting txi.%d [%d:%d]\n",coin->symbol,i,bp->hdrsi,bundlei); break; } } @@ -320,7 +320,7 @@ int32_t iguana_peerblockrequest(struct supernet_info *myinfo,struct iguana_info } } else printf("iguana_peerblockrequest: error merkle cmp tx.[%d] for ht.%d\n",i,bp->bundleheight+bundlei); } else printf("iguana_peerblockrequest: error merkle verify tx.[%d] for ht.%d\n",i,bp->bundleheight+bundlei); - } else printf("iguana_peerblockrequest: error getting tx.[%d] for ht.%d block.%p main.%d ht.%d\n",i,bp->bundleheight+bundlei,block,block!=0?block->mainchain:-1,block!=0?block->height:-1); + } else printf("%s iguana_peerblockrequest: error getting tx.[%d] for ht.%d block.%p main.%d ht.%d\n",coin->symbol,i,bp->bundleheight+bundlei,block,block!=0?block->mainchain:-1,block!=0?block->height:-1); } else {