From f6b22831f5e1e51f80b5a4e7b7dba7730bdf3a56 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 18 Sep 2016 10:43:51 -0300 Subject: [PATCH] test --- iguana/iguana_ramchain.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index d260d4eed..70106f6d0 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -2288,12 +2288,12 @@ struct iguana_ramchain *iguana_bundleload(struct supernet_info *myinfo,struct ig iguana_ramchain_link(mapchain,bp->hashes[0],bp->hdrsi,bp->bundleheight,0,bp->n,firsti,1); //char str[65]; printf("%s bp.%d: T.%d U.%d S.%d P%d X.%d MAPPED %s %p\n",coin->symbol,bp->hdrsi,mapchain->H.data->numtxids,mapchain->H.data->numunspents,mapchain->H.data->numspends,mapchain->H.data->numpkinds,mapchain->H.data->numexternaltxids,mbstr(str,mapchain->H.data->allocsize),mapchain->H.data); //ramcoder_test(mapchain->H.data,mapchain->H.data->allocsize); + firsttxidind = 1; if ( (rdata= ramchain->H.data) != 0 ) { B = RAMCHAIN_PTR(rdata,Boffset); T = RAMCHAIN_PTR(rdata,Toffset); prev = prev2 = 0; - firsttxidind = 1; for (i=0; in; i++) { if ( (block= bp->blocks[i]) != 0 || (block= iguana_blockhashset("bundleload",coin,bp->bundleheight+i,bp->hashes[i],1)) != 0 ) @@ -2305,7 +2305,6 @@ struct iguana_ramchain *iguana_bundleload(struct supernet_info *myinfo,struct ig } block->queued = 1; block->txvalid = 1; - block->RO.firsttxidind = firsttxidind; block->height = bp->bundleheight + i; //printf("bundleload bundlei.%d < height %d %d\n",i,block->height,i); block->hdrsi = bp->hdrsi; @@ -2315,6 +2314,7 @@ struct iguana_ramchain *iguana_bundleload(struct supernet_info *myinfo,struct ig //printf("%x ",(int32_t)B[i].hash2.ulongs[3]); bp->blocks[i] = block; bp->hashes[i] = block->RO.hash2; + block->RO.firsttxidind = firsttxidind; bp->firsttxidinds[i] = firsttxidind; iguana_hash2set(coin,"bundleload",bp,i,block->RO.hash2); if ( (prev= block->hh.prev) != 0 ) @@ -2332,11 +2332,12 @@ struct iguana_ramchain *iguana_bundleload(struct supernet_info *myinfo,struct ig //_iguana_chainlink(coin,block); //wrong context } prev2 = prev, prev = block; + printf("%d ",block->RO.txn_count); firsttxidind += block->RO.txn_count; } } } - //printf("mapped bundle.[%d]\n",bp->hdrsi); + printf("mapped bundle.[%d] numtxn.%d\n",bp->hdrsi,firsttxidind); bp->emitfinish = (uint32_t)time(NULL) + 1; iguana_bundlecalcs(myinfo,coin,bp,60); }