Block { @Override public String toString() { if (!parsed) parseRLP(); toStringBuff.setLength(0); toStringBuff.append(Hex.toHexString(this.rlpEncoded)).append("\n"); toStringBuff.append("BlockData [\n"); toStringBuff.append("hash=" + ByteUtil.toHexString(this.getHash())).append("\n"); toStringBuff.append(header.toString()); for (TransactionReceipt txReceipt : getTxReceiptList()) { toStringBuff.append("\n"); toStringBuff.append(txReceipt.toString()); } toStringBuff.append("\n]"); return toStringBuff.toString(); } 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; }
@Test public void testEmptyBlock() { byte[] payload = Hex.decode(block_32); Block blockData = new Block(payload); System.out.println(blockData.toString()); }
@Test public void testSingleBalanceTransfer() { byte[] payload = Hex.decode(block_17); Block blockData = new Block(payload); System.out.println(blockData.toString()); }
@Test public void testBlockWithContractCreation() { byte[] payload = Hex.decode(PoC7_GENESIS_HEX_RLP_ENCODED); Block block = new Block(payload); System.out.println(block.toString()); }