Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
7dbc60381e
  1. 2
      iguana/iguana777.h
  2. 8
      iguana/iguana_recv.c

2
iguana/iguana777.h

@ -39,7 +39,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_MAXPENDHDRS 1 #define IGUANA_MAXPENDHDRS 1
#define _IGUANA_MAXPENDING 7 #define _IGUANA_MAXPENDING 7
#define IGUANA_MINPENDBUNDLES 64 #define IGUANA_MINPENDBUNDLES 64
#define IGUANA_MAXPENDBUNDLES 128 #define IGUANA_MAXPENDBUNDLES 64
#define IGUANA_BUNDLELOOP 777 #define IGUANA_BUNDLELOOP 777
#define IGUANA_RPCPORT 7778 #define IGUANA_RPCPORT 7778
#define IGUANA_MAXRAMCHAINSIZE ((uint64_t)1024L * 1024L * 1024L * 16) #define IGUANA_MAXRAMCHAINSIZE ((uint64_t)1024L * 1024L * 1024L * 16)

8
iguana/iguana_recv.c

@ -429,7 +429,7 @@ int32_t iguana_bundlekick(struct iguana_info *coin,struct iguana_bundle *bp,int3
{ {
if ( block->fpipbits == 0 || block->RO.recvlen == 0 ) if ( block->fpipbits == 0 || block->RO.recvlen == 0 )
{ {
if ( block->issued == 0 || (now > block->issued+60 || (rand() % 100) == 0) ) if ( block->issued == 0 || now > block->issued+60 )//|| (rand() % 100) == 0) )
{ {
block->numrequests++; block->numrequests++;
//printf("bundleQ issue %d %x %d [%d:%d] numsaved.%d\n",block->RO.recvlen,block->fpipbits,block->fpos,bp->hdrsi,i,bp->numsaved); //printf("bundleQ issue %d %x %d [%d:%d] numsaved.%d\n",block->RO.recvlen,block->fpipbits,block->fpos,bp->hdrsi,i,bp->numsaved);
@ -440,7 +440,7 @@ int32_t iguana_bundlekick(struct iguana_info *coin,struct iguana_bundle *bp,int3
iguana_blockQ(coin,bp,i,block->RO.hash2,1); iguana_blockQ(coin,bp,i,block->RO.hash2,1);
} else*/ } else*/
iguana_blockQ("kick",coin,bp,i,block->RO.hash2,(rand() % 10) == 0); iguana_blockQ("kick",coin,bp,i,block->RO.hash2,0);
bp->issued[i] = block->issued = now; bp->issued[i] = block->issued = now;
counter++; counter++;
if ( --max <= 0 ) if ( --max <= 0 )
@ -1335,8 +1335,8 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr)
flag++; flag++;
} else printf("skip hdrreq.%s m.%d z.%d bp.%p longest.%d queued.%d\n",hashstr,m,z,bp,bp->coin->longestchain,bp->queued); } else printf("skip hdrreq.%s m.%d z.%d bp.%p longest.%d queued.%d\n",hashstr,m,z,bp,bp->coin->longestchain,bp->queued);
} }
//free_queueitem(hashstr); free_queueitem(hashstr);
//return(flag); return(flag);
} else printf("datalen.%d from gethdrs\n",datalen); } else printf("datalen.%d from gethdrs\n",datalen);
free_queueitem(hashstr); free_queueitem(hashstr);
hashstr = 0; hashstr = 0;

Loading…
Cancel
Save