Search in sources :

Example 1 with TransactionGetFastRecordQuery

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

the class GetFastTxnRecordAnswer method responseGiven.

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

Aggregations

ResponseType (com.hederahashgraph.api.proto.java.ResponseType)1 TransactionGetFastRecordQuery (com.hederahashgraph.api.proto.java.TransactionGetFastRecordQuery)1 TransactionGetFastRecordResponse (com.hederahashgraph.api.proto.java.TransactionGetFastRecordResponse)1