Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
6b6749e862
  1. 6
      iguana/iguana_peers.c
  2. 8
      iguana/iguana_txidfind.c

6
iguana/iguana_peers.c

@ -1245,13 +1245,13 @@ void iguana_dedicatedloop(struct supernet_info *myinfo,struct iguana_info *coin,
}
//printf(">>>>>>>>>>>>>> finish %s dedicatedloop.%s\n",coin->symbol,addr->ipaddr);
if ( addr->vinsfp != 0 )
fclose(addr->vinsfp);
fclose(addr->vinsfp), addr->vinsfp = 0;
if ( addr->voutsfp != 0 )
fclose(addr->voutsfp);
fclose(addr->voutsfp), addr->voutsfp = 0;
iguana_iAkill(coin,addr,addr->dead != 0);
myfree(buf,bufsize);
if ( addr->filehash2 != 0 )
myfree(addr->filehash2,addr->maxfilehash2*sizeof(*addr->filehash2));
myfree(addr->filehash2,addr->maxfilehash2*sizeof(*addr->filehash2)), addr->filehash2 = 0;
iguana_mempurge(&addr->RAWMEM);
iguana_mempurge(&addr->TXDATA);
iguana_mempurge(&addr->HASHMEM);

8
iguana/iguana_txidfind.c

@ -536,7 +536,7 @@ int64_t iguana_fastfindcreate(struct iguana_info *coin)
}
for (i=errs=0; i<0x100; i++)
{
fclose(coin->fastfps[i]);
fclose(coin->fastfps[i]), coin->fastfps[i] = 0;
sprintf(fname,"DB/%s/fastfind/%02x",coin->symbol,i), OS_compatible_path(fname);
//printf("%s\n",fname);
if ( (sortbuf= OS_filestr(&allocsize,fname)) != 0 )
@ -582,8 +582,7 @@ int64_t iguana_fastfindcreate(struct iguana_info *coin)
}
if ( fwrite(hashtable,sizeof(*hashtable),tablesize,coin->fastfps[i]) == tablesize )
{
fclose(coin->fastfps[i]);
coin->fastfps[i] = 0;
fclose(coin->fastfps[i]), coin->fastfps[i] = 0;
if ( (coin->fast[i]= OS_mapfile(fname,&coin->fastsizes[i],0)) != 0 )
{
} else errs++;
@ -593,8 +592,7 @@ int64_t iguana_fastfindcreate(struct iguana_info *coin)
{
printf("error saving (%s)\n",fname);
OS_removefile(fname,0);
fclose(coin->fastfps[i]);
coin->fastfps[i] = 0;
fclose(coin->fastfps[i]), coin->fastfps[i] = 0;
}
free(hashtable);
} else printf("couldnt overwrite (%s)\n",fname);

Loading…
Cancel
Save