Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
5070f0a2e3
  1. 2
      iguana/iguana777.c
  2. 10
      iguana/iguana_bundles.c
  3. 13
      iguana/iguana_ramchain.c

2
iguana/iguana777.c

@ -635,6 +635,8 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
printf("cant initialize chain.(%s)\n",jstr(json,0));
return(0);
} else iguana_chainparms(coin->chain,json);
//coin->RELAY = juint(json,"RELAY");
//coin->VALIDATE = juint(json,"VALIDATE");
if ( (peers= jarray(&m,json,"peers")) != 0 )
{
for (j=0; j<m; j++)

10
iguana/iguana_bundles.c

@ -761,11 +761,9 @@ int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp)
int32_t iguana_bundlefinish(struct iguana_info *coin,struct iguana_bundle *bp)
{
struct iguana_bundle *prevbp; int32_t i;//prevdone = 0;
/*if ( (prevbp= coin->bundles[bp->hdrsi-1]) != 0 && prevbp->balancefinish > 1 )
prevdone = 1;
else if ( coin->current != 0 && prevbp != 0 && coin->current->hdrsi >= prevbp->hdrsi && prevbp->emitfinish > 1 && time(NULL) > prevbp->emitfinish+13 )
prevdone = 1;*/
struct iguana_bundle *prevbp; int32_t i;
if ( (prevbp= coin->current) != 0 && prevbp->hdrsi < (coin->longestchain / coin->chain->bundlesize)-1 )
return(0);
for (i=0; i<bp->hdrsi; i++)
if ( (prevbp= coin->bundles[i]) == 0 || prevbp->emitfinish < coin->startutc )
break;
@ -816,7 +814,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
iguana_bundlehdr(coin,bp,starti);
else if ( bp->emitfinish != 0 )
{
//bp->nexttime -= 60;
bp->nexttime += 10;
if ( bp->emitfinish > 1 )
{
if ( (retval= iguana_bundlefinish(coin,bp)) > 0 )

13
iguana/iguana_ramchain.c

@ -2246,6 +2246,19 @@ struct iguana_ramchain *iguana_bundleload(struct iguana_info *coin,struct iguana
return(mapchain);
}
/*{
RAMCHAIN_DESTDECLARE; RAMCHAIN_DECLARE;
if ( iguana_ramchain_alloc(coin,dest,mem,&HASHMEM,numtxids,numunspents,numspends,numpkinds,numexternaltxids,scriptspace+sigspace,bp->bundleheight+starti,bp_n) == 0 )
{
iguana_ramchain_link(dest,bp->hashes[starti],bp->hashes[endi],bp->hdrsi,bp->bundleheight,0,bp->n,firsti,0);
dest->expanded = 1;
dest->H.scriptoffset = 1;
_iguana_ramchain_setptrs(RAMCHAIN_DESTPTRS,dest->H.data);
iguana_ramchain_extras(coin,dest,&HASHMEM,0);
}
}*/
// helper threads: NUM_HELPERS
int32_t iguana_bundlesaveHT(struct iguana_info *coin,struct OS_memspace *mem,struct OS_memspace *memB,struct iguana_bundle *bp,uint32_t starttime) // helper thread
{

Loading…
Cancel
Save