private Block createBlock(
      final BlockData blockData,
      final BlockHeader parentHeader,
      final List<Transaction> transactions) {
    final MiningCoordinator miner = controller.getMiningCoordinator();
    final GenesisConfigOptions genesisConfigOptions = controller.getGenesisConfigOptions();
    setOptionalFields(miner, blockData, genesisConfigOptions);

    // Some MiningCoordinator's (specific to consensus type) do not support block-level imports
    return miner
        .createBlock(parentHeader, transactions, Collections.emptyList())
        .orElseThrow(
            () ->
                new IllegalArgumentException(
                    "Unable to create block using current consensus engine: "
                        + genesisConfigOptions.getConsensusEngine()));
  }
Import chain.

@param chainJson the chain json
@throws IOException the io exception
app/src/main/java/org/hyperledger/besu/chainimport/JsonBlockImporter.java