public boolean validateRoundChange(final RoundChange msg) {

    if (!roundChangePayloadValidator.validateRoundChange(msg.getSignedPayload())) {
      LOG.info("Invalid RoundChange message, signed data did not validate correctly.");
      return false;
    }

    if (msg.getPreparedCertificate().isPresent() != msg.getProposedBlock().isPresent()) {
      LOG.info(
          "Invalid RoundChange message, availability of certificate does not correlate with availability of block.");
      return false;
    }

    if (msg.getPreparedCertificate().isPresent()) {
      if (!proposalBlockConsistencyValidator.validateProposalMatchesBlock(
          msg.getPreparedCertificate().get().getProposalPayload(),
          msg.getProposedBlock().get(),
          bftBlockInterface)) {
        LOG.info("Invalid RoundChange message, proposal did not align with supplied block.");
        return false;
      }
    }

    return true;
  }
Validate round change.

@param msg the msg
@return the boolean
consensus/ibft/src/main/java/org/hyperledger/besu/consensus/ibft/validation/RoundChangeMessageValidator.java