Search in sources :

Example 1 with UncheckedSubmitBody

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

the class HapiUncheckedSubmit method opBodyDef.

@Override
protected Consumer<TransactionBody.Builder> opBodyDef(HapiApiSpec spec) throws Throwable {
    var subOpBytes = subOp.serializeSignedTxnFor(spec);
    if (verboseLoggingOn) {
        log.info("Submitting unchecked: " + CommonUtils.extractTransactionBody(Transaction.parseFrom(subOpBytes)));
    }
    UncheckedSubmitBody opBody = spec.txns().<UncheckedSubmitBody, UncheckedSubmitBody.Builder>body(UncheckedSubmitBody.class, b -> {
        b.setTransactionBytes(ByteString.copyFrom(subOpBytes));
    });
    return b -> b.setUncheckedSubmit(opBody);
}
Also used : Transaction(com.hederahashgraph.api.proto.java.Transaction) UncheckedSubmitBody(com.hederahashgraph.api.proto.java.UncheckedSubmitBody) HapiTxnOp(com.hedera.services.bdd.spec.transactions.HapiTxnOp) MoreObjects(com.google.common.base.MoreObjects) Function(java.util.function.Function) ByteString(com.google.protobuf.ByteString) Consumer(java.util.function.Consumer) CommonUtils(com.hedera.services.legacy.proto.utils.CommonUtils) Logger(org.apache.logging.log4j.Logger) TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) HederaFunctionality(com.hederahashgraph.api.proto.java.HederaFunctionality) TransactionResponse(com.hederahashgraph.api.proto.java.TransactionResponse) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) LogManager(org.apache.logging.log4j.LogManager) UncheckedSubmit(com.hederahashgraph.api.proto.java.HederaFunctionality.UncheckedSubmit) UncheckedSubmitBody(com.hederahashgraph.api.proto.java.UncheckedSubmitBody)

Aggregations

MoreObjects (com.google.common.base.MoreObjects)1 ByteString (com.google.protobuf.ByteString)1 HapiApiSpec (com.hedera.services.bdd.spec.HapiApiSpec)1 HapiTxnOp (com.hedera.services.bdd.spec.transactions.HapiTxnOp)1 CommonUtils (com.hedera.services.legacy.proto.utils.CommonUtils)1 HederaFunctionality (com.hederahashgraph.api.proto.java.HederaFunctionality)1 UncheckedSubmit (com.hederahashgraph.api.proto.java.HederaFunctionality.UncheckedSubmit)1 Transaction (com.hederahashgraph.api.proto.java.Transaction)1 TransactionBody (com.hederahashgraph.api.proto.java.TransactionBody)1 TransactionResponse (com.hederahashgraph.api.proto.java.TransactionResponse)1 UncheckedSubmitBody (com.hederahashgraph.api.proto.java.UncheckedSubmitBody)1 Consumer (java.util.function.Consumer)1 Function (java.util.function.Function)1 LogManager (org.apache.logging.log4j.LogManager)1 Logger (org.apache.logging.log4j.Logger)1