public JsonRpcResponse response(final JsonRpcRequestContext requestContext) {
    if (validatorProvider.getVoteProviderAtHead().isPresent()) {
      final Map<String, Boolean> proposals =
          validatorProvider.getVoteProviderAtHead().get().getProposals().entrySet().stream()
              .collect(
                  Collectors.toMap(
                      proposal -> proposal.getKey().toString(),
                      proposal -> proposal.getValue() == VoteType.ADD));

      return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), proposals);
    } else {
      return new JsonRpcErrorResponse(
          requestContext.getRequest().getId(), RpcErrorType.METHOD_NOT_ENABLED);
    }
  }
Response.

@param requestContext the request context
@return the json rpc response
consensus/common/src/main/java/org/hyperledger/besu/consensus/common/jsonrpc/AbstractVoteProposerMethod.java