From f6bd0905d30a90b43f12da32eda6b2d09fb2cd0c Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 7 Apr 2016 01:12:52 -0500 Subject: [PATCH] test --- iguana/iguana_bundles.c | 2 +- iguana/iguana_recv.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index b63857183..cb8153572 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -516,7 +516,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 priority) { int32_t len; uint8_t *serialized; - if ( netBLOCKS > IGUANA_NUMHELPERS*5000 ) + if ( netBLOCKS > IGUANA_NUMHELPERS*1000 ) return(0); if ( addr->usock >= 0 && addr->dead == 0 && priority > 1 ) { diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 72173705e..66ee17c9e 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -1379,8 +1379,14 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr) struct iguana_block *block; struct iguana_blockreq *req=0; char *hashstr=0; bits256 hash2; int32_t bundlei,priority,i,m,z,pend,limit,height=-1,datalen,flag = 0; uint32_t now; struct iguana_bundle *bp; struct iguana_peer *ptr; - if ( addr->msgcounts.verack == 0 || netBLOCKS > IGUANA_NUMHELPERS*5000 ) + if ( addr->msgcounts.verack == 0 ) return(0); + if ( netBLOCKS > IGUANA_NUMHELPERS*1000 ) + { + usleep(netBLOCKS); + if ( netBLOCKS > IGUANA_NUMHELPERS*5000 ) + return(0); + } now = (uint32_t)time(NULL); if ( iguana_needhdrs(coin) != 0 && addr->pendhdrs < IGUANA_MAXPENDHDRS ) {