Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
d76944a4c2
  1. 14
      iguana/iguana_bundles.c
  2. 3
      iguana/iguana_ramchain.c

14
iguana/iguana_bundles.c

@ -603,7 +603,7 @@ int32_t iguana_bundlerequests(struct iguana_info *coin,uint8_t missings[IGUANA_M
int32_t iguana_bundleready(struct iguana_info *coin,struct iguana_bundle *bp)
{
int32_t i,ready,valid; char fname[1024]; void *ptr; long filesize; struct iguana_block *block; int32_t sum[0x100],counts[0x100];
int32_t i,ready,valid,checki,hdrsi; char fname[1024]; struct iguana_block *block; int32_t sum[0x100],counts[0x100]; static bits256 zero; FILE *fp;
memset(sum,0,sizeof(sum));
memset(counts,0,sizeof(counts));
for (i=ready=0; i<bp->n; i++)
@ -624,12 +624,14 @@ int32_t iguana_bundleready(struct iguana_info *coin,struct iguana_bundle *bp)
}
else
{
if ( (ptr= iguana_bundlefile(coin,fname,&filesize,bp,i)) != 0 )
checki = iguana_peerfname(coin,&hdrsi,GLOBALTMPDIR,fname,0,block->RO.hash2,zero,1,0);
if ( (fp= fopen(fname,"rb")) != 0 )
{
munmap(ptr,filesize);
ready++;
}
else iguana_blockunmark(coin,block,bp,i,0);
fseek(fp,0,SEEK_END);
if ( ftell(fp) > sizeof(struct iguana_ramchaindata) )
ready++;
fclose(fp);
} else iguana_blockunmark(coin,block,bp,i,0);
}
}
else

3
iguana/iguana_ramchain.c

@ -585,7 +585,7 @@ void *_iguana_ramchain_setptrs(RAMCHAIN_PTRPS,struct iguana_ramchaindata *rdata)
printf("_iguana_ramchain_setptrs: null rdata\n");
return(0);
}
printf("rdata.%p\n",rdata);
//printf("rdata.%p\n",rdata);
*B = (void *)(long)((long)rdata + (long)rdata->Boffset);
*T = (void *)(long)((long)rdata + (long)rdata->Toffset);
*Kspace = (void *)(long)((long)rdata + (long)rdata->Koffset);
@ -615,6 +615,7 @@ void *_iguana_ramchain_setptrs(RAMCHAIN_PTRPS,struct iguana_ramchaindata *rdata)
*S = (void *)(long)((long)rdata + (long)rdata->Soffset);
*Ux = 0, *Sx = 0, *P = 0, *X = 0, *A = 0, *TXbits = 0, *PKbits = 0; //*U2 = 0, *P2 = 0,
}
return(rdata);
}
void *iguana_ramchain_offset(void *dest,uint8_t *lhash,FILE *fp,uint64_t fpos,void *srcptr,uint64_t *offsetp,uint64_t len,uint64_t srcsize)

Loading…
Cancel
Save