diff --git a/ethereumj-core/src/main/java/org/ethereum/core/Block.java b/ethereumj-core/src/main/java/org/ethereum/core/Block.java index ed09578d..0cfb9088 100644 --- a/ethereumj-core/src/main/java/org/ethereum/core/Block.java +++ b/ethereumj-core/src/main/java/org/ethereum/core/Block.java @@ -37,6 +37,8 @@ public class Block { /* A scalar value equal to the mininum limit of gas expenditure per block */ private static long MIN_GAS_LIMIT = 125000L; public static BigInteger BLOCK_REWARD = BigInteger.valueOf(1500000000000000000L); + public static BigInteger UNCLE_REWARD = BLOCK_REWARD.multiply( + BigInteger.valueOf(7)).divide(BigInteger.valueOf(8)); private BlockHeader header; @@ -91,7 +93,7 @@ public class Block { // Parse Transactions RLPList txReceipts = (RLPList) block.get(1); - this.processTxs(txReceipts); + this.parseTxs(txReceipts); // Parse Uncles RLPList uncleBlocks = (RLPList) block.get(2); @@ -259,7 +261,7 @@ public class Block { return toStringBuff.toString(); } - private void processTxs(RLPList txReceipts) { + private void parseTxs(RLPList txReceipts) { this.txsState = new Trie(null); for (int i = 0; i < txReceipts.size(); i++) { diff --git a/ethereumj-core/src/main/java/org/ethereum/manager/WorldManager.java b/ethereumj-core/src/main/java/org/ethereum/manager/WorldManager.java index d4d8ea85..3c05e5cc 100644 --- a/ethereumj-core/src/main/java/org/ethereum/manager/WorldManager.java +++ b/ethereumj-core/src/main/java/org/ethereum/manager/WorldManager.java @@ -276,7 +276,6 @@ public class WorldManager { } } - private static BigInteger UNCLE_RATIO = BigInteger.valueOf(7).divide(BigInteger.valueOf(8)); public void applyBlock(Block block) { int i = 0; @@ -293,7 +292,7 @@ public class WorldManager { repository.createAccount(block.getCoinbase()); repository.addBalance(block.getCoinbase(), Block.BLOCK_REWARD); for (Block uncle : block.getUncleList()) { - repository.addBalance(uncle.getCoinbase(), Block.BLOCK_REWARD.multiply(UNCLE_RATIO)); + repository.addBalance(uncle.getCoinbase(), Block.UNCLE_REWARD); } }