Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
a729df071d
  1. 12
      iguana/iguana_ramchain.c
  2. 1
      iguana/iguana_unspents.c

12
iguana/iguana_ramchain.c

@ -2620,21 +2620,21 @@ int32_t iguana_bundlesaveHT(struct iguana_info *coin,struct OS_memspace *mem,str
iguana_bundlemapfree(coin,mem,&HASHMEM,ipbits,ptrs,filesizes,num,R,starti,endi);
if ( retval == 0 )//|| bp->generrs > 3 )
{
char dirname[1024];
//char dirname[1024];
//printf("delete %d files hdrs.%d retval.%d\n",num,bp->hdrsi,retval);
if ( 0 && bp_n == bp->n && bp->n == coin->chain->bundlesize && bp->hdrsi < coin->bundlescount-3 )
if ( iguana_bundleload(coin,&newchain,bp,0) == 0 )
retval = -1;
else if ( bp_n == bp->n && bp->n == coin->chain->bundlesize && bp->hdrsi < coin->bundlescount-3 )
{
for (j=starti; j<=endi; j++)
{
if ( iguana_peerfname(coin,&hdrsi,GLOBAL_TMPDIR,fname,1,bp->hashes[j],zero,1,1) >= 0 ) // ipbits[j]
if ( iguana_peerfname(coin,&hdrsi,GLOBAL_TMPDIR,fname,0,bp->hashes[j],zero,1,1) >= 0 )
coin->peers.numfiles -= OS_removefile(fname,0);
else printf("error removing.(%s)\n",fname);
}
sprintf(dirname,"%s/%s/%d",GLOBAL_TMPDIR,coin->symbol,bp->bundleheight), OS_portable_rmdir(dirname,1);
//sprintf(dirname,"%s/%s/%d",GLOBAL_TMPDIR,coin->symbol,bp->bundleheight), OS_portable_rmdir(dirname,1);
}
//sleep(1);
if ( iguana_bundleload(coin,&newchain,bp,0) == 0 )
retval = -1;
newchain.A = 0;
}
if ( coin->active != 0 )

1
iguana/iguana_unspents.c

@ -954,6 +954,7 @@ int64_t iguana_fastfindcreate(struct iguana_info *coin)
{
fclose(coin->fastfps[i]);
sprintf(fname,"DB/%s/fastfind/%02x",coin->symbol,i), OS_compatible_path(fname);
OS_removefile(fname,0);
//printf("%s\n",fname);
if ( (sortbuf= OS_filestr(&allocsize,fname)) != 0 )
{

Loading…
Cancel
Save