Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
71cacc08f8
  1. 6
      iguana/iguana_blocks.c
  2. 13
      iguana/iguana_ramchain.c

6
iguana/iguana_blocks.c

@ -370,9 +370,9 @@ struct iguana_block *_iguana_chainlink(struct iguana_info *coin,struct iguana_bl
//if ( block->fpipbits == 0 )
// iguana_blockQ(coin,bp,block->height % coin->chain->bundlesize,block->RO.hash2,1);
block->mainchain = 1;
iguana_blockreq(coin,block->height+1,1);
iguana_blockreq(coin,block->height+2,0);
iguana_blockreq(coin,block->height+3,0);
iguana_blockreq(coin,block->height+1,0);
//iguana_blockreq(coin,block->height+2,0);
//iguana_blockreq(coin,block->height+3,0);
return(block);
}
}

13
iguana/iguana_ramchain.c

@ -2425,13 +2425,16 @@ int32_t iguana_bundlesaveHT(struct iguana_info *coin,struct OS_memspace *mem,str
{
char dirname[1024];
//printf("delete %d files hdrs.%d retval.%d\n",num,bp->hdrsi,retval);
for (j=starti; j<=endi; j++)
if ( bp_n == bp->n )
{
if ( iguana_peerfname(coin,&hdrsi,GLOBALTMPDIR,fname,1,bp->hashes[j],zero,1) >= 0 ) // ipbits[j]
coin->peers.numfiles -= OS_removefile(fname,0);
else printf("error removing.(%s)\n",fname);
for (j=starti; j<=endi; j++)
{
if ( iguana_peerfname(coin,&hdrsi,GLOBALTMPDIR,fname,1,bp->hashes[j],zero,1) >= 0 ) // ipbits[j]
coin->peers.numfiles -= OS_removefile(fname,0);
else printf("error removing.(%s)\n",fname);
}
sprintf(dirname,"%s/%s/%d",GLOBALTMPDIR,coin->symbol,bp->bundleheight), OS_portable_rmdir(dirname,1);
}
sprintf(dirname,"%s/%s/%d",GLOBALTMPDIR,coin->symbol,bp->bundleheight), OS_portable_rmdir(dirname,1);
iguana_bundleload(coin,&newchain,bp,0);
newchain.A = 0;
}

Loading…
Cancel
Save