logger.info("Minning on block: [{}] ", block.getNumber());
// assertEquals(rlpWithoutNonce, Hex.toHexString(block.getEncodedWithoutNonce()));
// System.out.println("Searching for nonce of following block: \n" + block.toString());
Miner miner = new Miner();
boolean mined = miner.mine(block, block.getDifficulty());
assertTrue(mined);
boolean valid = block.validateNonce();
assertTrue(valid);
logger.info("found nonce: [{}]", Hex.toHexString(block.getNonce()));
while(true){
Block newBlock = createBlock(block);
mined = miner.mine(newBlock, newBlock.getDifficulty());
assertTrue(mined);
valid = newBlock.validateNonce();
assertTrue(valid);
block = newBlock;
logger.info("found nonce: [{}]", Hex.toHexString(newBlock.getNonce()));