public Block createBlock(String previous, Transaction coinbase) { Block block = new Block(); try { Thread.sleep(1001); } catch (InterruptedException e) { } block.setCreateTime(System.currentTimeMillis() / 1000); block.setDifficultyTarget(chain.getGenesis().getDifficultyTarget()); block.setPreviousHash(previous); block.setVersion(2); block.setNonce(0); block.setTransactions(new ArrayList<Transaction>()); block.getTransactions().add(coinbase); return block; }