Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
a376ee14af
  1. 6
      iguana/iguana_blocks.c
  2. 2
      iguana/iguana_unspents.c

6
iguana/iguana_blocks.c

@ -352,11 +352,13 @@ struct iguana_block *iguana_fastlink(struct iguana_info *coin,int32_t hwmheight)
printf("iguana_fastlink null bundle.[%d]\n",hdrsi);
break;
}
if ( (block= bp->blocks[bundlei]) == 0 )
block = iguana_blockhashset("fastlink",coin,height,bp->hashes[bundlei],1);
if ( bp->blocks[bundlei] != 0 && block != bp->blocks[bundlei] )
{
printf("iguana_fastlink null block.[%d:%d]\n",hdrsi,bundlei);
break;
}
bp->blocks[bundlei] = block;
coin->blocks.maxblocks = (block->height + 1);
if ( coin->blocks.maxblocks > coin->longestchain )
coin->longestchain = coin->blocks.maxblocks;
@ -368,11 +370,11 @@ struct iguana_block *iguana_fastlink(struct iguana_info *coin,int32_t hwmheight)
block->hh.prev = prev;
if ( prev != 0 )
prev->hh.next = block;
iguana_bundlehash2add(coin,0,bp,bundlei,block->RO.hash2);
prev = block;
prevPoW = block->PoW;
}
iguana_walkchain(coin,0);
iguana_walkchain(coin,1);
return(block);
}

2
iguana/iguana_unspents.c

@ -1308,8 +1308,6 @@ int32_t iguana_volatilesinit(struct iguana_info *coin)
coin->blocks.hwmchain = *iguana_blockfind("init",coin,coin->bundles[coin->balanceswritten-1]->hashes[bp->n-1]);
if ( (n= iguana_walkchain(coin,0)) > 0 )
printf("iguana_walkchain n.%d vs hwmheight.%d\n",n,coin->blocks.hwmchain.height);
if ( (n= iguana_walkchain(coin,0)) > 0 )
printf("iguana_walkchainB n.%d vs hwmheight.%d\n",n,coin->blocks.hwmchain.height);
//iguana_fastlink(coin,coin->balanceswritten * coin->chain->bundlesize - 1);
return(coin->balanceswritten);
}

Loading…
Cancel
Save