diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 8d479df32..e979001a9 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -530,7 +530,7 @@ int32_t iguana_bundlerequests(struct iguana_info *coin,uint8_t missings[IGUANA_M if ( (block= iguana_bundleblock(coin,&hash2,bp,nonz)) != 0 ) hash2 = block->RO.hash2; bp->issued[nonz] = now; - //char str[65]; printf("issue.[%d:%d] %s %u\n",bp->hdrsi,nonz,bits256_str(str,hash2),now); + char str[65]; printf("issue.[%d:%d] %s %u\n",bp->hdrsi,nonz,bits256_str(str,hash2),now); nonz++; } else printf("bundlerequests unexpected nonz.%d c.%d m.%d n.%d numsent.%d i.%d\n",nonz,c,m,n,numsent,i); } @@ -870,6 +870,8 @@ int32_t iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp, { uint8_t missings[IGUANA_MAXBUNDLESIZE/8+1]; int32_t tmp,missing,avail,n,max; missing = iguana_blocksmissing(coin,&avail,missings,0,bp,0,lag); + if ( strcmp("BTC",coin->symbol) != 0 ) + lag /= 10; if ( bp->numissued < bp->n ) max = bp->numissued; else max = bp->origmissings; @@ -1038,7 +1040,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag) { if ( (block= iguana_bundleblock(coin,&hash2,bp,i)) == 0 && bits256_nonz(hash2) != 0 ) block = iguana_blockfind(coin,hash2); - if ( block == 0 || _iguana_chainlink(coin,block) == 0 ) + if ( block == 0 || bits256_nonz(block->RO.prev_block) == 0 || _iguana_chainlink(coin,block) == 0 ) break; } } diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index b35d9c0d6..e7b0c8e4f 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -309,13 +309,13 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i { numDuplicates++; sizeDuplicates += recvlen; - //printf("duplicate [%d:%d] %s\n",bp->hdrsi,bundlei,bits256_str(str,block->RO.hash2)); + printf("duplicate [%d:%d] %s\n",bp->hdrsi,bundlei,bits256_str(str,block->RO.hash2)); if ( bits256_cmp(origtxdata->block.RO.hash2,block->RO.hash2) == 0 ) return; else printf("mismatched tx received? mainchain.%d\n",block->mainchain); if ( block->mainchain != 0 ) return; - } //else printf("recv [%d:%d] %s\n",bp->hdrsi,bundlei,bits256_str(str,block->RO.hash2)); + } else printf("recv [%d:%d] %s\n",bp->hdrsi,bundlei,bits256_str(str,block->RO.hash2)); block->RO = origtxdata->block.RO; block->txvalid = 1; //printf("update prev for [%d:%d]\n",bp->hdrsi,bundlei);