From e34d2f4599101355c9973e0d24b35510cc60df90 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 30 Mar 2016 12:39:47 -0300 Subject: [PATCH] test --- iguana/iguana_bundles.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 31623d33a..43b3d7781 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -479,7 +479,7 @@ int32_t iguana_blocksmissing(struct iguana_info *coin,int32_t *nonzp,uint8_t mis int32_t iguana_sendhashes(struct iguana_info *coin,struct iguana_peer *addr,int32_t msgtype,bits256 hashes[],int32_t n) { int32_t len; uint8_t *serialized; - if ( 1 )// && strcmp("BTC",coin->symbol) != 0 ) + if ( (rand() % 10) == 0 || strcmp("BTC",coin->symbol) != 0 ) { serialized = malloc((sizeof(int32_t) + sizeof(*hashes))*n + 1024); if ( (len= iguana_getdata(coin,serialized,MSG_BLOCK,hashes,n)) > 0 ) @@ -502,8 +502,8 @@ int32_t iguana_sendhashes(struct iguana_info *coin,struct iguana_peer *addr,int3 int32_t i; for (i=0; ipriorityQ,0)) != 0 ) myfree(breq,sizeof(*breq)); } - iguana_blocksmissing(coin,&avail,missings,0,bp,bp->n,coin->MAXSTUCKTIME); + n = iguana_blocksmissing(coin,&avail,missings,0,bp,bp->n,0*coin->MAXSTUCKTIME); + printf("issued %d priority requests [%d] to unstick stuckiters.%d lag.%d\n",n,bp->hdrsi,coin->stuckiters,lag); /*for (i=n=0; in; i++) { if ( lag < coin->MAXSTUCKTIME )