jl777 8 years ago
parent
commit
66245c1ded
  1. 2
      iguana/iguana777.c
  2. 10
      iguana/iguana_ramchain.c

2
iguana/iguana777.c

@ -176,7 +176,7 @@ int32_t iguana_peermetrics(struct supernet_info *myinfo,struct iguana_info *coin
}
coin->peers->numranked = n;
portable_mutex_unlock(&coin->peers_mutex);
printf("peer metrics NUMRANKED.%d\n",n);
//printf("peer metrics NUMRANKED.%d\n",n);
if ( i > 0 )
{
coin->peers->avemetric = (sum / i);

10
iguana/iguana_ramchain.c

@ -1999,10 +1999,10 @@ void iguana_blockdelete(struct iguana_info *coin,bits256 hash2,int32_t i)
if ( fname[0] != 0 )
{
OS_removefile(fname,0);
#ifndef WIN32
/*#ifndef WIN32
strcat(fname,".tmp");
OS_removefile(fname,0);
#endif
#endif*/
}
}
@ -2087,7 +2087,7 @@ int32_t iguana_oldbundlefiles(struct iguana_info *coin,uint32_t *ipbits,void **p
void *iguana_bundlefile(struct iguana_info *coin,char *fname,long *filesizep,struct iguana_bundle *bp,int32_t bundlei,int32_t renameflag)
{
int32_t checki,hdrsi; long checksize; void *ptr = 0; FILE *fp; static const bits256 zero; char renamed[1024];
int32_t checki,hdrsi; long checksize; void *ptr = 0; FILE *fp; static const bits256 zero; //char renamed[1024];
*filesizep = 0;
fname[0] = 0;
if ( (checki= iguana_peerfname(coin,&hdrsi,GLOBAL_TMPDIR,fname,0,bp->hashes[bundlei],zero,1,1)) != bundlei || bundlei < 0 || bundlei >= coin->chain->bundlesize )
@ -2102,14 +2102,14 @@ void *iguana_bundlefile(struct iguana_info *coin,char *fname,long *filesizep,str
fseek(fp,0,SEEK_END);
checksize = ftell(fp);
fclose(fp);
//#ifndef WIN32
/*#ifndef WIN32
if ( renameflag != 0 )
{
sprintf(renamed,"%s.tmp",fname);
OS_copyfile(fname,renamed,1);
strcpy(fname,renamed);
}
//#endif
//#endif*/
if ( (ptr= OS_mapfile(fname,filesizep,0)) == 0 )
{
printf("error mapping.(%s) bundlei.%d\n",fname,bundlei);

Loading…
Cancel
Save