From 47787f4786e82c2d2e6faa93b89ec3e2b8d014c0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 12 Mar 2016 23:56:53 -0300 Subject: [PATCH] test --- iguana/iguana777.c | 2 +- iguana/iguana_recv.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 45bbedef3..bccd481e9 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -429,7 +429,7 @@ void iguana_coinloop(void *arg) } } if ( flag == 0 ) - usleep((coin->polltimeout+1) * 1000); + usleep((coin->polltimeout+1) * 10); } } diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 3963f27b3..6ad54daa0 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -154,6 +154,7 @@ struct iguana_txblock *iguana_peertxdata(struct iguana_info *coin,int32_t *bundl } #endif +static int32_t BLOCKnet; void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct iguana_txblock *origtxdata,struct iguana_msgtx *txarray,struct iguana_msghdr *H,uint8_t *data,int32_t recvlen) { struct iguana_bundlereq *req; struct iguana_txblock *txdata = 0; int32_t valid,i,j,bundlei,copyflag; char fname[1024]; @@ -243,6 +244,7 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i coin->recvcount++; coin->recvtime = (uint32_t)time(NULL); req->addr = addr; + BLOCKnet++; queue_enqueue("bundlesQ",&coin->bundlesQ,&req->DL,0); } @@ -269,7 +271,7 @@ void iguana_gotheadersM(struct iguana_info *coin,struct iguana_peer *addr,struct req = iguana_bundlereq(coin,addr,'H',0); req->blocks = blocks, req->n = n; HDRnet++; - char str[65]; printf("PTblockhdrs.%s net.%d\n",bits256_str(str,blocks[0].RO.hash2),HDRnet); + char str[65]; printf("PTblockhdrs.%s net.%d blocks.%d\n",bits256_str(str,blocks[0].RO.hash2),HDRnet,BLOCKnet); queue_enqueue("bundlesQ",&coin->bundlesQ,&req->DL,0); } @@ -866,6 +868,7 @@ int32_t iguana_processbundlesQ(struct iguana_info *coin,int32_t *newhwmp) // sin // continue; if ( req->type == 'B' ) // one block with all txdata { + BLOCKnet--; req = iguana_recvblock(coin,req->addr,req,&req->block,req->numtx,req->datalen,req->recvlen,newhwmp); flag++; }