diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index 3206629e93..da711fcb15 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -1398,7 +1398,7 @@ func (e *enclaveImpl) GetPublicTransactionData(pagination *common.QueryPaginatio // Create a helper to check if a gas allowance results in an executable transaction // isGasEnough returns whether the gaslimit should be raised, lowered, or if it was impossible to execute the message func (e *enclaveImpl) isGasEnough(args *gethapi.TransactionArgs, gas uint64, blkNumber *gethrpc.BlockNumber) (bool, *gethcore.ExecutionResult, error) { - core.LogMethodDuration(e.logger, measure.NewStopwatch(), "enclave.go:IsGasEnough") + defer core.LogMethodDuration(e.logger, measure.NewStopwatch(), "enclave.go:IsGasEnough") args.Gas = (*hexutil.Uint64)(&gas) result, err := e.chain.ObsCallAtBlock(args, blkNumber) if err != nil { diff --git a/go/enclave/evm/evm_facade.go b/go/enclave/evm/evm_facade.go index 08550c5f8a..cf0fc976f4 100644 --- a/go/enclave/evm/evm_facade.go +++ b/go/enclave/evm/evm_facade.go @@ -164,7 +164,7 @@ func ExecuteObsCall( noBaseFee = false } - core.LogMethodDuration(logger, measure.NewStopwatch(), "evm_facade.go:ObsCall()") + defer core.LogMethodDuration(logger, measure.NewStopwatch(), "evm_facade.go:ObsCall()") chain, vmCfg, gp := initParams(storage, noBaseFee, nil) ethHeader, err := gethencoding.CreateEthHeaderForBatch(header, secret(storage))