public Block replaceRoundInBlock(
      final Block block, final int round, final BlockHeaderFunctions blockHeaderFunctions) {
    final BftExtraData prevExtraData = bftExtraDataCodec.decode(block.getHeader());
    final BftExtraData substituteExtraData =
        new BftExtraData(
            prevExtraData.getVanityData(),
            prevExtraData.getSeals(),
            prevExtraData.getVote(),
            round,
            prevExtraData.getValidators());

    final BlockHeaderBuilder headerBuilder = BlockHeaderBuilder.fromHeader(block.getHeader());
    headerBuilder
        .extraData(bftExtraDataCodec.encode(substituteExtraData))
        .blockHeaderFunctions(blockHeaderFunctions);

    final BlockHeader newHeader = headerBuilder.buildBlockHeader();

    return new Block(newHeader, block.getBody());
  }
Replace round in block.

@param block the block
@param round the round
@param blockHeaderFunctions the block header functions
@return the block
consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftBlockInterface.java