@Override
  public void setFinalizedBlock(final Hash blockHash) {
    final var protocolSpec = getProtocolSpec(blockHash);

    if (protocolSpec.isPoS()) {
      throw new UnsupportedOperationException(
          "Marking block as finalized is not supported for PoS networks");
    }
    blockchain.setFinalized(blockHash);
  }
Gets block header by hash

@param hash the block hash
@return the block header if block exists otherwise empty
app/src/main/java/org/hyperledger/besu/services/BlockchainServiceImpl.java