Examples of calcGasLimit()


Examples of org.ethereum.core.BlockchainImpl.calcGasLimit()

   
    @Test
    public void testCalcGasLimit() {
        BlockchainImpl blockchain =  (BlockchainImpl)worldManager.getBlockchain();
      Block genesis = Genesis.getInstance();
      long gasLimit = blockchain.calcGasLimit(genesis.getHeader());
        logger.info("Genesis gasLimit: [{}] ", gasLimit);
      assertEquals(Genesis.GAS_LIMIT, gasLimit);

      // Test with block
      Block block1 = new Block(Hex.decode(PoC7_GENESIS_HEX_RLP_ENCODED));
View Full Code Here

Examples of org.ethereum.core.BlockchainImpl.calcGasLimit()

        logger.info("Genesis gasLimit: [{}] ", gasLimit);
      assertEquals(Genesis.GAS_LIMIT, gasLimit);

      // Test with block
      Block block1 = new Block(Hex.decode(PoC7_GENESIS_HEX_RLP_ENCODED));
      long calcGasLimit = blockchain.calcGasLimit(block1.getHeader());
      long actualGasLimit = block1.getGasLimit();
        blockchain.tryToConnect(block1);
      logger.info("Block#1 actual gasLimit [{}] ", actualGasLimit);
        logger.info("Block#1 calculated gasLimit [{}] ", calcGasLimit);
      assertEquals(actualGasLimit, calcGasLimit);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.