From 60cc35be95d960798d3553a1b0c4b202102aeac6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 12 Jan 2016 06:25:57 -0300 Subject: [PATCH] test --- iguana/iguana777.h | 2 +- iguana/iguana_peers.c | 4 ++-- iguana/iguana_recv.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iguana/iguana777.h b/iguana/iguana777.h index d5e5ea926..a1743aec6 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -390,7 +390,7 @@ struct iguana_bundle uint32_t issuetime,hdrtime,emitfinish,mergefinish,purgetime; int32_t minrequests,numhashes,numissued,numrecv,n,hdrsi,bundleheight,numtxids,numspends,numunspents; double avetime,threshold,metric; uint64_t datasize,estsize; - struct iguana_block *blocks[IGUANA_MAXBUNDLESIZE]; + struct iguana_block *blocks[IGUANA_MAXBUNDLESIZE]; uint32_t issued[IGUANA_MAXBUNDLESIZE]; bits256 prevbundlehash2,hashes[IGUANA_MAXBUNDLESIZE+1],nextbundlehash2,allhash; struct iguana_ramchain ramchain; uint8_t red,green,blue; }; diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index 38b0fd437..4e027800c 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -900,7 +900,7 @@ int64_t iguana_peerallocated(struct iguana_info *coin,struct iguana_peer *addr) void iguana_dedicatedloop(struct iguana_info *coin,struct iguana_peer *addr) { static uint32_t lastping; - struct pollfd fds; uint8_t *buf,serialized[64]; struct iguana_bundlereq *req; + struct pollfd fds; uint8_t *buf; struct iguana_bundlereq *req; //,serialized[64] int32_t bufsize,flag,run,timeout = coin->polltimeout == 0 ? 10 : coin->polltimeout; #ifdef IGUANA_PEERALLOC int32_t i; int64_t remaining; struct OS_memspace *mem[sizeof(addr->SEROUT)/sizeof(*addr->SEROUT)]; @@ -989,7 +989,7 @@ void iguana_dedicatedloop(struct iguana_info *coin,struct iguana_peer *addr) } } } - if ( 0 && flag == 0 ) + if ( flag == 0 ) { if ( run++ > 1000 ) { diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 15efe8054..d83d3b46a 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -702,11 +702,11 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr) if ( (bp= coin->bundles[height/coin->chain->bundlesize]) != 0 && bp->emitfinish == 0 ) { bundlei = (height % coin->chain->bundlesize); - if ( bundlei < bp->n && bits256_nonz(bp->hashes[bundlei]) > 0 && (block= bp->blocks[bundlei]) != 0 && block->numrequests <= bp->minrequests && block->fpipbits == 0 )//&& block->queued == 0 )//(bp->issued[bundlei] == 0 || now > bp->issued[bundlei]+10) ) + if ( bundlei < bp->n && bits256_nonz(bp->hashes[bundlei]) > 0 && (block= bp->blocks[bundlei]) != 0 && block->numrequests <= bp->minrequests && block->fpipbits == 0 && (bp->issued[bundlei] == 0 || now > bp->issued[bundlei]+10) ) { if ( block->numrequests < 100 ) block->numrequests++; - //block->issued = (uint32_t)time(NULL);; + bp->issued[bundlei] = (uint32_t)time(NULL);; if ( 0 && (rand() % 100) == 0 ) printf("%s Send auto blockreq.%d [%d] minreq.%d\n",addr->ipaddr,bp->bundleheight+bundlei,block->numrequests,bp->minrequests); iguana_sendblockreq(coin,addr,bp,bundlei,bp->hashes[bundlei],0);