public static RoundChangeArtifacts create(final Collection<RoundChange> roundChanges) {

    final Comparator<RoundChange> preparedRoundComparator =
        (o1, o2) -> {
          if (!o1.getPreparedCertificateRound().isPresent()) {
            return -1;
          }
          if (!o2.getPreparedCertificateRound().isPresent()) {
            return 1;
          }
          return o1.getPreparedCertificateRound()
              .get()
              .compareTo(o2.getPreparedCertificateRound().get());
        };

    final List<SignedData<RoundChangePayload>> payloads =
        roundChanges.stream().map(RoundChange::getSignedPayload).collect(Collectors.toList());

    final Optional<RoundChange> roundChangeWithNewestPrepare =
        roundChanges.stream().max(preparedRoundComparator);

    final Optional<Block> proposedBlock =
        roundChangeWithNewestPrepare.flatMap(RoundChange::getProposedBlock);
    return new RoundChangeArtifacts(proposedBlock, payloads);
  }
Create round change artifacts.

@param roundChanges the round changes
@return the round change artifacts
consensus/ibft/src/main/java/org/hyperledger/besu/consensus/ibft/statemachine/RoundChangeArtifacts.java