jl777 8 years ago
parent
commit
f6b22831f5
  1. 7
      iguana/iguana_ramchain.c

7
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; i<bp->n; 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);
}

Loading…
Cancel
Save