Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
e22013ec13
  1. 4
      iguana/iguana777.h
  2. 11
      iguana/iguana_bundles.c
  3. 4
      iguana/iguana_ramchain.c
  4. 2
      iguana/iguana_recv.c

4
iguana/iguana777.h

@ -25,7 +25,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_MAXSCRIPTSIZE 10001
#define IGUANA_SERIALIZE_SPENDVECTORGEN
//#define IGUANA_DISABLEPEERS
#define _IGUANA_MAXSTUCKTIME 20
#define _IGUANA_MAXSTUCKTIME 10
#define IGUANA_MAXITERATIONS 2000
#define IGUANA_DEFAULTLAG 30
@ -41,7 +41,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_HEADPERCENTAGE 0.
#define IGUANA_TAILPERCENTAGE 1.0
#define IGUANA_MAXPENDHDRS 1
#define IGUANA_MAXPENDINGREQUESTS 3
#define IGUANA_MAXPENDINGREQUESTS 7
#define IGUANA_PENDINGREQUESTS 64
#define IGUANA_MINPENDBUNDLES 2
#define IGUANA_MAXPENDBUNDLES 256

11
iguana/iguana_bundles.c

@ -214,9 +214,10 @@ int32_t iguana_bundlehash2add(struct iguana_info *coin,struct iguana_block **blo
{
char str[65],str2[65];
printf("bp->hashes[%d] mismatch %s != %s%s\n",bundlei,bits256_str(str,bp->hashes[bundlei]),bits256_str(str2,block->RO.hash2),block->mainchain?".main":"");
if ( block->mainchain != 0 )
bp->hashes[bundlei] = block->RO.hash2;
else return(-1);
//if ( block->mainchain != 0 )
// bp->hashes[bundlei] = block->RO.hash2;
return(-1);
}
/*if ( (block->hdrsi != bp->hdrsi || block->bundlei != bundlei) && (block->hdrsi != 0 || block->bundlei != 0) )
{
@ -1024,8 +1025,8 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag)
{
for (j=0; j<bp->n; j++)
{
if ( bp->blocks[j] == 0 && bp->speculative != 0 && bits256_nonz(bp->speculative[j]) != 0 )
bp->blocks[j] = iguana_blockhashset("speculative3",coin,bp->bundleheight+j,bp->speculative[j],1);
//if ( bp->blocks[j] == 0 && bp->speculative != 0 && bits256_nonz(bp->speculative[j]) != 0 )
// bp->blocks[j] = iguana_blockhashset("speculative3",coin,bp->bundleheight+j,bp->speculative[j],1);
if ( bp->speculativecache[j] != 0 )
{
if ( (block= iguana_blockhashset("bundlestats3",coin,-1,bp->speculative[j],1)) != 0 && block->processed == 0 )

4
iguana/iguana_ramchain.c

@ -1346,7 +1346,7 @@ struct iguana_ramchain *iguana_ramchain_map(struct iguana_info *coin,char *fname
{
for (i=0; i<bp->n; i++)
{
if ( bp->blocks[i] == 0 )// iguana_blockhashset("mapchain",coin,-1,B[i].hash2,1)) == 0 )
if ( bp->blocks[i] == 0 && (bp->blocks[i]= iguana_blockhashset("mapchain",coin,-1,B[i].hash2,1)) == 0 )
{
printf("Error getting blockptr\n");
return(0);
@ -2129,7 +2129,7 @@ struct iguana_ramchain *iguana_bundleload(struct iguana_info *coin,struct iguana
T = (void *)(long)((long)mapchain->H.data + mapchain->H.data->Toffset);
for (i=0; i<bp->n; i++)
{
if ( (block= bp->blocks[i]) != 0 )//|| (block= iguana_blockhashset("bundleload",coin,bp->bundleheight+i,bp->hashes[i],1)) != 0 )
if ( (block= bp->blocks[i]) != 0 || (block= iguana_blockhashset("bundleload",coin,bp->bundleheight+i,bp->hashes[i],1)) != 0 )
{
block->queued = 1;
block->height = bp->bundleheight + i;

2
iguana/iguana_recv.c

@ -1032,7 +1032,7 @@ int32_t iguana_reqblocks(struct iguana_info *coin)
}
}
lflag = 1;
while ( coin->active != 0 && iters < IGUANA_MAXITERATIONS )
while ( coin->active != 0 && iters < 10*IGUANA_MAXITERATIONS )
{
iters++;
lflag = 0;

Loading…
Cancel
Save