@Override
  public JsonRpcResponse response(final JsonRpcRequestContext requestContext) {
    if (validatorProvider.getVoteProviderAtHead().isPresent()) {
      final Address validatorAddress;
      try {
        validatorAddress = requestContext.getRequiredParameter(0, Address.class);
      } catch (JsonRpcParameterException e) {
        throw new InvalidJsonRpcParameters(
            "Invalid validator address parameter (index 0)",
            RpcErrorType.INVALID_ADDRESS_PARAMS,
            e);
      }
      LOG.trace("Received RPC rpcName={} address={}", getName(), validatorAddress);
      validatorProvider.getVoteProviderAtHead().get().discardVote(validatorAddress);

      return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), true);
    } else {
      return new JsonRpcErrorResponse(
          requestContext.getRequest().getId(), RpcErrorType.METHOD_NOT_ENABLED);
    }
  }
Instantiates a new Qbft discard validator vote.

@param validatorProvider the validator provider
consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/jsonrpc/methods/QbftDiscardValidatorVote.java