Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
2180d4798c
  1. 6
      iguana/iguana_bundles.c
  2. 6
      iguana/iguana_ramchain.c

6
iguana/iguana_bundles.c

@ -364,7 +364,7 @@ void iguana_bundlepurge(struct iguana_info *coin,struct iguana_bundle *bp)
}
}
int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp)
int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp,int32_t done)
{
int32_t bundlei; struct iguana_block *block;
if ( bp->emitfinish > coin->startutc )
@ -403,7 +403,7 @@ int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp)
}
//bp->metric = bp->numhashes;
bp->metric = 1000 + sqrt(sqrt(bp->n * (1 + bp->numsaved + bp->numrecv)) * (10 + coin->bundlescount - bp->hdrsi));
if ( bp->hdrsi > coin->bundlescount*.9 )
if ( done > coin->bundlescount/3 && bp->hdrsi > coin->bundlescount*.9 )
bp->metric *= 1000;
return(bp->estsize);
}
@ -441,7 +441,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str)
if ( (bp= coin->bundles[i]) != 0 )
{
bp->rank = 0;
estsize += iguana_bundlecalcs(coin,bp);
estsize += iguana_bundlecalcs(coin,bp,done);
numhashes += bp->numhashes;
numcached += bp->numcached;
numrecv += bp->numrecv;

6
iguana/iguana_ramchain.c

@ -1970,7 +1970,9 @@ int32_t iguana_ramchain_scriptspace(struct iguana_info *coin,int32_t *sigspacep,
if ( (spendind= ramchain->H.spendind++) < rdata->numspends )
{
sequence = S[spendind].sequenceid;
if ( (scriptdata= iguana_scriptptr(coin,&scriptlen,_script,S[spendind].scriptfpos,S[spendind].vinscriptptr,S[spendind].vinscriptlen,sizeof(S[spendind].vinscriptptr),1)) != 0 )
scriptlen = S[spendind].vinscriptlen;
scriptdata = S[spendind].vinscriptptr;
//if ( (scriptdata= iguana_scriptptr(coin,&scriptlen,_script,S[spendind].scriptfpos,S[spendind].vinscriptptr,S[spendind].vinscriptlen,sizeof(S[spendind].vinscriptptr),1)) != 0 )
{
iguana_vinscriptparse(coin,&V,&sigsize,&pubkeysize,&p2shsize,&suffixlen,scriptdata,scriptlen);
p2shspace += p2shsize;
@ -2231,7 +2233,7 @@ int32_t iguana_ramchain_expandedsave(struct iguana_info *coin,RAMCHAIN_FUNC,stru
uint8_t *destoffset,*srcoffset;
firsthash2 = ramchain->H.data->firsthash2, lasthash2 = ramchain->H.data->lasthash2;
height = ramchain->height, firsti = ramchain->H.data->firsti, hdrsi = ramchain->H.hdrsi, numblocks = ramchain->numblocks;
if ( bp->bundleheight == 32000 || bp->bundleheight == 150000 || bp->bundleheight == 116000 || bp->bundleheight == 166000 || bp->bundleheight == 130000 || bp->bundleheight == 180000 || bp->bundleheight == 140000 || bp->bundleheight == 90000 || bp->bundleheight == 176000 || bp->bundleheight == 340000 )
if ( bp->bundleheight == 32000 || bp->bundleheight == 150000 || bp->bundleheight == 116000 || bp->bundleheight == 166000 || bp->bundleheight == 130000 || bp->bundleheight == 180000 || bp->bundleheight == 140000 || bp->bundleheight == 90000 || bp->bundleheight == 176000 || bp->bundleheight == 340000 || bp->bundleheight == 374000 )
{
printf("skip ht.%d for now\n",bp->bundleheight);
return(-1);

Loading…
Cancel
Save