Search in sources :

Example 1 with CryptoGetLiveHashQuery

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

the class GetLiveHashAnswer method responseGiven.

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

Aggregations

CryptoGetLiveHashQuery (com.hederahashgraph.api.proto.java.CryptoGetLiveHashQuery)1 CryptoGetLiveHashResponse (com.hederahashgraph.api.proto.java.CryptoGetLiveHashResponse)1 ResponseType (com.hederahashgraph.api.proto.java.ResponseType)1