Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
1cc403f26a
  1. 6
      iguana/iguana_bundles.c

6
iguana/iguana_bundles.c

@ -1103,18 +1103,18 @@ void iguana_bundlestats(struct iguana_info *coin,char *str)
if ( bits256_nonz(hash2) == 0 ) if ( bits256_nonz(hash2) == 0 )
continue; continue;
fprintf(stderr,"-[%d:%d] ",bp->hdrsi,j); fprintf(stderr,"-[%d:%d] ",bp->hdrsi,j);
if ( (rand() % 10) == 0 ) if ( (rand() % 10) == 0 || bp->numcached >= bp->n-2 )
{ {
struct iguana_peer *addr; int32_t r; struct iguana_peer *addr; int32_t r;
if ( 1 && (r= coin->peers.numranked) != 0 && (addr= coin->peers.ranked[rand() % r]) != 0 && addr->dead == 0 && addr->usock >= 0 ) if ( 1 && (r= coin->peers.numranked) != 0 && (addr= coin->peers.ranked[rand() % r]) != 0 && addr->dead == 0 && addr->usock >= 0 )
iguana_sendblockreqPT(coin,addr,bp,j,hash2,0), printf("%s ",addr->ipaddr); iguana_sendblockreqPT(coin,addr,bp,j,hash2,0), printf("%s ",addr->ipaddr);
printf("currentstop [%d:%d]\n",bp->hdrsi,j); fprintf(stderr,"currentstop [%d:%d]\n",bp->hdrsi,j);
iguana_blockQ("currentstop",coin,bp,j,hash2,1); iguana_blockQ("currentstop",coin,bp,j,hash2,1);
//bp->issued[j] = (uint32_t)time(NULL); //bp->issued[j] = (uint32_t)time(NULL);
} }
} }
} }
printf("[%d] check numcached.%d numhashes.%d numsaved.%d\n",bp->hdrsi,bp->numcached,bp->numhashes,bp->numsaved); fprintf(stderr,"[%d] check numcached.%d numhashes.%d numsaved.%d\n",bp->hdrsi,bp->numcached,bp->numhashes,bp->numsaved);
} }
if ( bp->speculative != 0 && (bp->numsaved + bp->numcached) == bp->n ) if ( bp->speculative != 0 && (bp->numsaved + bp->numcached) == bp->n )
{ {

Loading…
Cancel
Save