From 29d510c09c6f4ca2fb9570074769e199be7838b6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 21 Mar 2016 17:44:45 -0300 Subject: [PATCH] test --- iguana/iguana_recv.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 722515fad..d02c13eac 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -53,7 +53,7 @@ int32_t iguana_sendblockreqPT(struct iguana_info *coin,struct iguana_peer *addr, coin->numreqsent++; addr->pendblocks++; addr->pendtime = (uint32_t)time(NULL); - if ( 0 && coin->current == bp ) + //if ( 0 && coin->current == bp ) printf("REQ.%s bundlei.%d hdrsi.%d\n",bits256_str(hexstr,hash2),bundlei,bp!=0?bp->hdrsi:-1); } else printf("MSG_BLOCK null datalen.%d\n",len); return(len); @@ -1202,20 +1202,19 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr) { hash2 = req->hash2; height = req->height; - block = 0; - if ( priority == 0 && (bp= req->bp) != 0 && req->bundlei >= 0 && req->bundlei < bp->n && req->bundlei < coin->chain->bundlesize && (block= bp->blocks[req->bundlei]) != 0 && (block->fpipbits != 0 || block->queued != 0) ) + if ( (bp= req->bp) != 0 && req->bundlei >= 0 && req->bundlei < bp->n ) + block = bp->blocks[req->bundlei]; + else block = 0; + if ( priority == 0 && bp != 0 && req->bundlei >= 0 && req->bundlei < bp->n && req->bundlei < coin->chain->bundlesize && block != 0 && (block->fpipbits != 0 || block->queued != 0) ) { - if ( 1 && priority != 0 ) + //if ( 1 && priority != 0 ) printf("SKIP %p[%d] %d\n",bp,bp!=0?bp->bundleheight:-1,req->bundlei); } else { - char str[65]; if ( block != 0 ) block->numrequests++; - //if ( 0 && priority != 0 ) - printf("sendreq %s [%d:%d]\n",bits256_str(str,hash2),bp!=0?bp->bundleheight:-1,req->bundlei); - iguana_sendblockreqPT(coin,addr,req->bp,req->bundlei,hash2,0); + iguana_sendblockreqPT(coin,addr,bp,req->bundlei,hash2,0); } flag++; myfree(req,sizeof(*req));