diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index ab0a6b779..fa908cb3a 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -615,7 +615,7 @@ struct iguana_block *iguana_bundleblock(struct iguana_info *coin,bits256 *hash2p int32_t iguana_bundleissuemissing(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_bundle *bp,int32_t priority,double mult) { - int32_t i,max,nonz,starti,lasti,firsti,lag,num,n=0; uint32_t now; bits256 hash2; double aveduration; struct iguana_peer *addr; //struct iguana_block *block; + int32_t i,max,nonz,starti,lasti,firsti,lag,num,n=0; uint32_t now; bits256 hash2; double aveduration; struct iguana_peer *addr; struct iguana_block *block; if ( coin->peers == 0 ) { printf("%s has no peers\n",coin->symbol); @@ -657,10 +657,10 @@ int32_t iguana_bundleissuemissing(struct supernet_info *myinfo,struct iguana_inf lasti = firsti = -1; for (i=nonz=0; in; i++) { - //if ( (block= bp->blocks[i]) != 0 && block->txvalid != 0 && block->mainchain != 0 ) - // continue; - if ( GETBIT(bp->haveblock,i) != 0 ) + if ( (block= bp->blocks[i]) != 0 && block->txvalid != 0 && block->mainchain != 0 ) continue; + //if ( GETBIT(bp->haveblock,i) != 0 ) + // continue; nonz++; if ( firsti < 0 ) firsti = i; @@ -672,8 +672,7 @@ int32_t iguana_bundleissuemissing(struct supernet_info *myinfo,struct iguana_inf { if ( (addr= coin->peers->ranked[rand() % max]) != 0 && addr->usock >= 0 && addr->dead == 0 ) //strcmp("BTC",coin->symbol) != 0 || (bp->issued[i] > 1 && now > bp->issued[i]+lag && { - if ( 0 && bp == coin->current ) - printf("iguana_bundleissuemissing.[%d:%d]\n",bp->hdrsi,i); + printf("reqPT "); iguana_sendblockreqPT(coin,0,bp,i,hash2,0); } struct iguana_blockreq *req = 0; @@ -685,7 +684,9 @@ int32_t iguana_bundleissuemissing(struct supernet_info *myinfo,struct iguana_inf queue_enqueue("missing",&coin->priorityQ,&req->DL,0); bp->issued[i] = 1; n++; - } //else printf("[z%d] ",i); + if ( bp == coin->current ) + printf("iguana_bundleissuemissing.[%d:%d]\n",bp->hdrsi,i); + } //else printf("[z%d] ",i); } //else printf("%d ",now - (bp->issued[i]+lag)); } if ( firsti >= 0 )//&& bp == coin->current ) diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 8d998db67..4f25fc650 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -809,7 +809,8 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru } numtx = origtxdata->zblock.RO.txn_count; iguana_RTgotblock(coin,origtxdata->zblock.RO.hash2,data,&recvlen,&numtx); - printf("getblockM update [%d:%d] %s %p\n",bp->hdrsi,bundlei,bits256_str(str,origtxdata->zblock.RO.hash2),block); + if ( bp == coin->current ) + printf("getblockM update [%d:%d] %s %p\n",bp->hdrsi,bundlei,bits256_str(str,origtxdata->zblock.RO.hash2),block); if ( block != 0 ) { if ( block->height < 0 )