jl777 8 years ago
parent
commit
517c76b0eb
  1. 2
      iguana/iguana_msg.c
  2. 32
      iguana/iguana_ramchain.c

2
iguana/iguana_msg.c

@ -976,7 +976,7 @@ int32_t iguana_msgparser(struct supernet_info *myinfo,struct iguana_info *coin,s
if ( (n= iguana_gentxarray(myinfo,coin,rawmem,&txdata,&len,data,recvlen)) == recvlen || n == recvlen-1 )
{
len = n;
iguana_gotblockM(myinfo,coin,addr,&txdata,rawmem->ptr,H,data,recvlen,fromcache,0*coin->chain->zcash);
iguana_gotblockM(myinfo,coin,addr,&txdata,rawmem->ptr,H,data,recvlen,fromcache,coin->chain->zcash);
}
else
{

32
iguana/iguana_ramchain.c

@ -1915,7 +1915,7 @@ long iguana_ramchain_data(struct supernet_info *myinfo,struct iguana_info *coin,
block->RO.recvlen = 0;
}
}
else if ( 1 )//coin->chain->zcash == 0 )
else
{
if ( (err= iguana_ramchain_verify(coin,ramchain)) == 0 )
{
@ -1952,36 +1952,6 @@ long iguana_ramchain_data(struct supernet_info *myinfo,struct iguana_info *coin,
fpos = -1;
}
}
else
{
FILE *fp;
if ( (fp= fopen(fname,"wb")) != 0 )
{
*B = RO;
rdata->scriptspace = ramchain->H.scriptoffset = scriptspace;
rdata->stackspace = ramchain->H.stacksize = stackspace;
/*if ( fwrite(rdata,1,sizeof(*rdata),fp) != sizeof(*rdata) )
{
printf("ramchain_save error writing header.%s\n",fname);
fpos = -1;
}
fpos = (int32_t)ftell(fp);
fwrite(B,1,sizeof(*B),fp);
fwrite(T,rdata->numtxids,sizeof(*T),fp);
fwrite(U,rdata->numunspents,sizeof(*U),fp);
fwrite(S,rdata->numspends,sizeof(*S),fp);*/
fclose(fp);
//printf("offset.%d vs allocsize.%d\n",(int32_t)offset,(int32_t)rdata->allocsize);
origtxdata->datalen = (int32_t)rdata->allocsize;
ramchain->H.ROflag = 0;
flag = 1;
bp->numtxids += rdata->numtxids;
bp->numunspents += rdata->numunspents;
bp->numspends += rdata->numspends;
if ( block != 0 && fpos >= 0 )
block->fpos = fpos, block->fpipbits = (uint32_t)addr->ipbits;
}
}
}
if ( addr != 0 )
{

Loading…
Cancel
Save