Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
56d295f973
  1. 2
      iguana/iguana777.h
  2. 9
      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 16 #define IGUANA_MINPENDBUNDLES 16
#define IGUANA_MAXPENDBUNDLES 96 #define IGUANA_MAXPENDBUNDLES 128
#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)

9
iguana/iguana_recv.c

@ -460,6 +460,7 @@ int32_t iguana_bundlekick(struct iguana_info *coin,struct iguana_bundle *bp,int3
} }
if ( minblock != 0 ) if ( minblock != 0 )
{ {
issued++;
minblock->numrequests++; minblock->numrequests++;
iguana_blockQ("kick",coin,bp,mini,minblock->RO.hash2,0); iguana_blockQ("kick",coin,bp,mini,minblock->RO.hash2,0);
bp->issued[i] = minblock->issued = now; bp->issued[i] = minblock->issued = now;
@ -552,7 +553,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int
return(0); return(0);
} }
//printf("BUNDLEITERS.%d\n",bp->hdrsi); //printf("BUNDLEITERS.%d\n",bp->hdrsi);
if ( bp->hdrsi <= starti+sqrt(range) && coin->lastpending != 0 ) if ( bp->hdrsi <= starti+range && coin->lastpending != 0 )
{ {
for (i=0; i<bp->n; i++) for (i=0; i<bp->n; i++)
{ {
@ -569,11 +570,11 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int
iguana_bundleQ(coin,bp,1000); iguana_bundleQ(coin,bp,1000);
return(0); return(0);
} }
max = bp->n - (bp->n/coin->MAXBUNDLES)*(bp->hdrsi - starti); max = bp->n;// - (bp->n/coin->MAXBUNDLES)*(bp->hdrsi - starti);
if ( max > 100 ) /*if ( max > 100 )
max = 100; max = 100;
else if ( max < 10 ) else if ( max < 10 )
max = 10; max = 10;*/
if ( bp != currentbp ) if ( bp != currentbp )
{ {
//printf("initial requests for hdrs.%d\n",bp->hdrsi); //printf("initial requests for hdrs.%d\n",bp->hdrsi);

Loading…
Cancel
Save