Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
2ae03cf951
  1. 4
      iguana/iguana_bundles.c
  2. 4
      iguana/iguana_recv.c

4
iguana/iguana_bundles.c

@ -516,8 +516,6 @@ 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 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; int32_t len; uint8_t *serialized;
if ( netBLOCKS > IGUANA_NUMHELPERS*1000 )
return(0);
if ( addr->usock >= 0 && addr->dead == 0 && priority > 1 ) if ( addr->usock >= 0 && addr->dead == 0 && priority > 1 )
{ {
serialized = malloc((sizeof(int32_t) + sizeof(*hashes))*n + 1024); serialized = malloc((sizeof(int32_t) + sizeof(*hashes))*n + 1024);
@ -1100,7 +1098,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag)
} }
else else
{ {
if ( bp->hdrsi >= starti && bp->hdrsi < lasti && (displag % 3) == 2 ) if ( bp->hdrsi >= starti && bp->hdrsi < lasti && (displag % 3) == 2 && netBLOCKS < IGUANA_NUMHELPERS*1000 )
{ {
if ( (aveduration= iguana_bundlemissings(coin,bp,recentduration)) != 0 ) if ( (aveduration= iguana_bundlemissings(coin,bp,recentduration)) != 0 )
dxblend(&recentduration,aveduration,.5); dxblend(&recentduration,aveduration,.5);

4
iguana/iguana_recv.c

@ -1382,11 +1382,7 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr)
if ( addr->msgcounts.verack == 0 ) if ( addr->msgcounts.verack == 0 )
return(0); return(0);
if ( netBLOCKS > IGUANA_NUMHELPERS*1000 ) if ( netBLOCKS > IGUANA_NUMHELPERS*1000 )
{
usleep(netBLOCKS); usleep(netBLOCKS);
if ( netBLOCKS > IGUANA_NUMHELPERS*5000 )
return(0);
}
now = (uint32_t)time(NULL); now = (uint32_t)time(NULL);
if ( iguana_needhdrs(coin) != 0 && addr->pendhdrs < IGUANA_MAXPENDHDRS ) if ( iguana_needhdrs(coin) != 0 && addr->pendhdrs < IGUANA_MAXPENDHDRS )
{ {

Loading…
Cancel
Save