Add failing Block calc tests and update Denomination enum

This commit is contained in:
nicksavers 2014-06-07 15:49:34 +02:00
parent 693930c7e4
commit 6407f48c3a
1 changed files with 1 additions and 3 deletions

View File

@ -90,13 +90,11 @@ public class Blockchain extends ArrayList<Block> {
private void addBlock(Block block) {
if(block.isValid()) {
this.wallet.processBlock(block);
// that is the genesis case , we don't want to rely
// on this price will use default 10000000000000
// todo: refactor this longValue some constant defaults class 10000000000000L
this.gasPrice = block.isGenesis() ? INITIAL_MIN_GAS_PRICE : block.getMinGasPrice();
if(lastBlock == null || block.getNumber() > lastBlock.getNumber())
if(lastBlock == null || block.getNumber() > lastBlock.getNumber())
this.lastBlock = block;
this.add(block);
}