use of org.ethereum.jsontestsuite.model.BlockHeaderTck in project rskj by rsksmart.
the class BlockBuilder method build.
public static Block build(BlockHeaderTck header, List<TransactionTck> transactionsTck, List<BlockHeaderTck> unclesTck) {
if (header == null)
return null;
List<BlockHeader> uncles = new ArrayList<>();
if (unclesTck != null)
for (BlockHeaderTck uncle : unclesTck) uncles.add(BlockHeaderBuilder.build(uncle));
List<Transaction> transactions = new ArrayList<>();
if (transactionsTck != null)
for (TransactionTck tx : transactionsTck) transactions.add(TransactionBuilder.build(tx));
BlockHeader blockHeader = BlockHeaderBuilder.build(header);
Block block = new Block(blockHeader, transactions, uncles);
return block;
}
Aggregations