@Test public void testCalcGasLimit() { WorldManager.getInstance(); Block genesis = Genesis.getInstance(); long gasLimit = genesis.calcGasLimit(); System.out.println("Genesis gasLimit = " + gasLimit); assertEquals(Genesis.GAS_LIMIT, gasLimit); WorldManager.getInstance().getBlockchain().add(genesis); Block block1 = new Block(Hex.decode(PoC7_GENESIS_HEX_RLP_ENCODED)); long calcGasLimit = block1.calcGasLimit(); long actualGasLimit = block1.getGasLimit(); System.out.println("Block#1 actual gasLimit = " + actualGasLimit); System.out.println("Block#1 calculated gasLimit = " + calcGasLimit); assertEquals(actualGasLimit, calcGasLimit); }
public long calcGasLimit() { if (!parsed) parseRLP(); return this.header.calcGasLimit(); }
Block { public long calcGasLimit() { if (!parsed) parseRLP(); return this.header.calcGasLimit(); } }
Block { public long calcGasLimit() { if (!parsed) parseRLP(); return this.header.calcGasLimit(); } Block(byte[] rawData);  Block(byte[] parentHash, byte[] unclesHash, byte[] coinbase,
			byte[] difficulty, long number, long minGasPrice, long gasLimit,
			long gasUsed, long timestamp, byte[] extraData, byte[] nonce,
			List<Transaction> transactionsList, List<BlockHeader> uncleList); }
Block { public long calcGasLimit() { if (!parsed) parseRLP(); return this.header.calcGasLimit(); } Block(byte[] rawData);  Block(byte[] parentHash, byte[] unclesHash, byte[] coinbase,
			byte[] difficulty, long number, long minGasPrice, long gasLimit,
			long gasUsed, long timestamp, byte[] extraData, byte[] nonce,
			List<Transaction> transactionsList, List<BlockHeader> uncleList); byte[] getHash(); Block getParent(); byte[] calcDifficulty(); long calcGasLimit(); boolean validateNonce(); byte[] getParentHash(); byte[] getUnclesHash(); byte[] getCoinbase(); byte[] getStateRoot(); void setStateRoot(byte[] stateRoot); byte[] getTxTrieRoot(); byte[] getDifficulty(); BigInteger getCumulativeDifficulty(); long getTimestamp(); long getNumber(); long getMinGasPrice(); long getGasLimit(); long getGasUsed(); byte[] getExtraData(); byte[] getNonce(); void setNonce(byte[] nonce); List<Transaction> getTransactionsList(); List<TransactionReceipt> getTxReceiptList(); List<BlockHeader> getUncleList(); @Override String toString(); String toFlatString(); String toStylishString(); boolean isValid(); boolean isGenesis(); byte[] getEncoded(); byte[] getEncodedWithoutNonce(); }
Block { public long calcGasLimit() { if (!parsed) parseRLP(); return this.header.calcGasLimit(); } Block(byte[] rawData);  Block(byte[] parentHash, byte[] unclesHash, byte[] coinbase,
			byte[] difficulty, long number, long minGasPrice, long gasLimit,
			long gasUsed, long timestamp, byte[] extraData, byte[] nonce,
			List<Transaction> transactionsList, List<BlockHeader> uncleList); byte[] getHash(); Block getParent(); byte[] calcDifficulty(); long calcGasLimit(); boolean validateNonce(); byte[] getParentHash(); byte[] getUnclesHash(); byte[] getCoinbase(); byte[] getStateRoot(); void setStateRoot(byte[] stateRoot); byte[] getTxTrieRoot(); byte[] getDifficulty(); BigInteger getCumulativeDifficulty(); long getTimestamp(); long getNumber(); long getMinGasPrice(); long getGasLimit(); long getGasUsed(); byte[] getExtraData(); byte[] getNonce(); void setNonce(byte[] nonce); List<Transaction> getTransactionsList(); List<TransactionReceipt> getTxReceiptList(); List<BlockHeader> getUncleList(); @Override String toString(); String toFlatString(); String toStylishString(); boolean isValid(); boolean isGenesis(); byte[] getEncoded(); byte[] getEncodedWithoutNonce(); static BigInteger BLOCK_REWARD; static BigInteger UNCLE_REWARD; static BigInteger INCLUSION_REWARD; }