public BlockBody body(final BlockOptions options) {
    final List<BlockHeader> ommers = new ArrayList<>();
    if (options.hasOmmers()) {
      final int ommerCount = random.nextInt(3);
      for (int i = 0; i < ommerCount; i++) {
        ommers.add(ommer());
      }
    }
    final List<Transaction> defaultTxs = new ArrayList<>();
    if (options.hasTransactions()) {
      defaultTxs.add(transaction(options.getTransactionTypes()));
      defaultTxs.add(transaction(options.getTransactionTypes()));
    }

    return new BlockBody(
        options.getTransactions(defaultTxs), ommers, options.getWithdrawals(Optional.empty()));
  }
Generates a sequence of blocks with some accounts and account storage pre-populated with random
data.
ethereum/core/src/test-support/java/org/hyperledger/besu/ethereum/core/BlockDataGenerator.java