From 44d53cdb4a3a2c8ffcb0de820daed766d604336e Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 3 Apr 2016 00:56:30 -0600 Subject: [PATCH] test --- iguana/iguana_bundles.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index b4e9dc64b..c3cbfd167 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -592,10 +592,17 @@ int32_t iguana_bundlerequests(struct iguana_info *coin,uint8_t missings[IGUANA_M int32_t iguana_bundleready(struct iguana_info *coin,struct iguana_bundle *bp) { int32_t i,ready,valid; struct iguana_block *block; int32_t sum[0x100],counts[0x100]; + memset(sum,0,sizeof(sum)); + memset(counts,0,sizeof(counts)); for (i=ready=0; in; i++) { if ( (block= bp->blocks[i]) != 0 ) { + if ( block->lag != 0 && block->peerid != 0 ) + { + sum[block->peerid] += block->lag; + counts[block->peerid]++; + } //printf("(%x:%x) ",(uint32_t)block->RO.hash2.ulongs[3],(uint32_t)bp->hashes[i].ulongs[3]); if ( iguana_blockvalidate(coin,&valid,block,1) < 0 || block->fpipbits == 0 || block->fpos < 0 || (bp->bundleheight+i > 0 && bits256_nonz(block->RO.prev_block) == 0) ) {