Search in sources :

Example 1 with CryptoGetStakersQuery

use of com.hederahashgraph.api.proto.java.CryptoGetStakersQuery in project hedera-services by hashgraph.

the class GetStakersAnswer method responseGiven.

@Override
public Response responseGiven(Query query, StateView view, ResponseCodeEnum validity, long cost) {
    CryptoGetStakersQuery op = query.getCryptoGetProxyStakers();
    ResponseType type = op.getHeader().getResponseType();
    CryptoGetStakersResponse.Builder response = CryptoGetStakersResponse.newBuilder();
    if (type == COST_ANSWER) {
        response.setHeader(costAnswerHeader(NOT_SUPPORTED, 0L));
    } else {
        response.setHeader(answerOnlyHeader(NOT_SUPPORTED));
    }
    return Response.newBuilder().setCryptoGetProxyStakers(response).build();
}
Also used : CryptoGetStakersQuery(com.hederahashgraph.api.proto.java.CryptoGetStakersQuery) CryptoGetStakersResponse(com.hederahashgraph.api.proto.java.CryptoGetStakersResponse) ResponseType(com.hederahashgraph.api.proto.java.ResponseType)

Aggregations

CryptoGetStakersQuery (com.hederahashgraph.api.proto.java.CryptoGetStakersQuery)1 CryptoGetStakersResponse (com.hederahashgraph.api.proto.java.CryptoGetStakersResponse)1 ResponseType (com.hederahashgraph.api.proto.java.ResponseType)1