}
@Test
public void testCalcDifficulty() {
Blockchain blockchain = worldManager.getBlockchain();
Block genesis = Genesis.getInstance();
BigInteger difficulty = new BigInteger(1, genesis.calcDifficulty());
logger.info("Genesis difficulty: [{}]", difficulty.toString());
assertEquals(new BigInteger(1, Genesis.DIFFICULTY), difficulty);
// Storing genesis because the parent needs to be in the DB for calculation.
blockchain.add(genesis);
Block block1 = new Block(Hex.decode(PoC7_GENESIS_HEX_RLP_ENCODED));
BigInteger calcDifficulty = new BigInteger(1, block1.calcDifficulty());
BigInteger actualDifficulty = new BigInteger(1, block1.getDifficulty());
logger.info("Block#1 actual difficulty: [{}] ", actualDifficulty.toString());