Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
5de8350c45
  1. 3
      iguana/iguana_bundles.c
  2. 2
      iguana/iguana_realtime.c

3
iguana/iguana_bundles.c

@ -474,7 +474,7 @@ char *iguana_bundleaddrs(struct iguana_info *coin,int32_t hdrsi)
void iguana_bundlepurgefiles(struct iguana_info *coin,struct iguana_bundle *bp)
{
static const bits256 zero;
char fname[1024]; FILE *fp; int32_t subdir,hdrsi,j,lasti,i,m = 0; uint32_t ipbits = 0;
char fname[1024]; FILE *fp; int32_t recvlen,numtx,subdir,hdrsi,j,lasti,i,m = 0; uint32_t ipbits = 0;
if ( coin->current != 0 )
lasti = coin->current->hdrsi;
else lasti = 0;
@ -482,6 +482,7 @@ void iguana_bundlepurgefiles(struct iguana_info *coin,struct iguana_bundle *bp)
{
for (j=m=0; j<bp->n; j++)
{
iguana_RTrawdata(coin,bp->hashes[j],0,&recvlen,&numtx,0); // delete file
if ( iguana_peerfname(coin,&hdrsi,GLOBAL_TMPDIR,fname,ipbits,bp->hashes[j],zero,1,1) >= 0 )
{
if ( (fp= fopen(fname,"rb")) != 0 )

2
iguana/iguana_realtime.c

@ -546,7 +546,7 @@ void *iguana_RTrawdata(struct iguana_info *coin,bits256 hash2,uint8_t *data,int3
if ( fwrite(recvlenp,1,sizeof(*recvlenp),fp) != sizeof(*recvlenp) || fwrite(numtxp,1,sizeof(*numtxp),fp) != sizeof(*numtxp) || fwrite(data,1,*recvlenp,fp) != *recvlenp )
printf("error writing %s len.%d numtx.%d\n",bits256_str(str,hash2),*recvlenp,*numtxp);
fclose(fp);
printf("numtx.%d len.%d %s\n",*numtxp,*recvlenp,fname);
printf("numtx.%d len.%d %s hwm.%d L.%d\n",*numtxp,*recvlenp,fname,coin->blocks.hwmchain.height,coin->longestchain);
} else printf("couldnt create %s\n",fname);
}
else if ( (ptr= OS_mapfile(fname,&filesize,0)) != 0 )

Loading…
Cancel
Save