Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
a323091364
  1. 14
      iguana/iguana_ramchain.c

14
iguana/iguana_ramchain.c

@ -1287,9 +1287,9 @@ int64_t iguana_ramchain_init(struct iguana_ramchain *ramchain,struct OS_memspace
rdata = ramchain->H.data = mem->ptr;//, offset += sizeof(struct iguana_ramchaindata);
if ( (rdata->firsti= firsti) != 0 )
{
//numtxids++, numunspents++, numspends++;
//if ( numpkinds != 0 )
// numpkinds++;
numtxids++, numunspents++, numspends++;
if ( numpkinds != 0 )
numpkinds++;
}
if ( numexternaltxids == 0 )
numexternaltxids = numspends;
@ -1328,12 +1328,6 @@ int32_t iguana_ramchain_alloc(struct iguana_info *coin,struct iguana_ramchain *r
B = 0, Ux = 0, Sx = 0, P = 0, A = 0, X = 0, Kspace = TXbits = PKbits = 0, U = 0, S = 0, T = 0;
memset(ramchain,0,sizeof(*ramchain));
ramchain->height = height;
if ( ramchain->H.data->firsti != 0 )
{
numtxids++, numunspents++, numspends++;
if ( numpkinds != 0 )
numpkinds++;
}
allocsize = _iguana_rdata_action(0,0,0,0,1,numtxids,numunspents,numspends,numpkinds,numexternaltxids,scriptspace,0,0,0,0,0,RAMCHAIN_ARG,numblocks);
//printf("T.%d U.%d S.%d P.%d X.%d -> %ld\n",numtxids,numunspents,numspends,numpkinds,numexternaltxids,(long)allocsize);
memset(mem,0,sizeof(*mem));
@ -1345,7 +1339,7 @@ int32_t iguana_ramchain_alloc(struct iguana_info *coin,struct iguana_ramchain *r
sleep(3);
}
iguana_meminit(hashmem,"ramhashmem",0,hashsize,0);
iguana_meminit(mem,"ramchain",0,allocsize,0);
iguana_meminit(mem,"ramchain",0,allocsize + 65536,0);
mem->alignflag = sizeof(uint32_t);
hashmem->alignflag = sizeof(uint32_t);
if ( iguana_ramchain_init(ramchain,mem,hashmem,1,numtxids,numunspents,numspends,numpkinds,numexternaltxids,scriptspace,1,numblocks) == 0 )

Loading…
Cancel
Save