Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
5320740b41
  1. 6
      iguana/iguana777.c
  2. 10
      iguana/iguana_bundles.c

6
iguana/iguana777.c

@ -416,6 +416,12 @@ int32_t iguana_helperB(struct iguana_info *coin,int32_t helperid,struct iguana_b
void iguana_update_balances(struct iguana_info *coin)
{
int32_t i,hdrsi,max; struct iguana_bundle *bp; char fname[1024];
if ( coin->RTheight > 0 )
{
printf("Need to restart iguana to generate new balances files\n");
printf("RT dataset can expand past bundle boundary, so no need to update balance files now\n");
return;
}
max = coin->bundlescount;
if ( coin->bundles[max-1] != 0 && coin->bundles[max-1]->emitfinish <= 1 && coin->RTheight == 0 )
max--;

10
iguana/iguana_bundles.c

@ -218,20 +218,20 @@ int32_t iguana_bundlehash2add(struct iguana_info *coin,struct iguana_block **blo
}
else
{
printf("bp.[%d]->blocks[%d] mismatch %p != %p\n",bp->hdrsi,bundlei,bp->blocks[bundlei],block);
if ( coin->RTheight > 0 && bp->bundleheight+bundlei > coin->firstRTheight )
{
if ( bundlei > 0 )
bundlei--;
if ( (block= iguana_blockfind("reset",coin,bp->hashes[0])) != 0 )
if ( bundlei > 1 )
bundlei -= 2;
if ( bp->bundleheight+bundlei > coin->blocks.hwmchain.height && (block= iguana_blockfind("reset",coin,bp->hashes[0])) != 0 )
{
iguana_blockzcopy(coin->chain->zcash,(void *)&coin->blocks.hwmchain,block);
printf("RESET HWM to %d ht.%d\n",bp->bundleheight+bundlei,block->height);
return(-1);
} else printf("couldnt find block at %d\n",bp->bundleheight+bundlei);
} //else printf("couldnt find block at %d\n",bp->bundleheight+bundlei);
}
else if ( bundlei > 0 )
{
printf("bp.[%d]->blocks[%d] mismatch %p != %p\n",bp->hdrsi,bundlei,bp->blocks[bundlei],block);
bp->blocks[bundlei] = 0;
}
iguana_blockunmark(coin,block,bp,bundlei,1);

Loading…
Cancel
Save