From 9108828aeb0888f71aae6fd9be92e32ab05c3bdb Mon Sep 17 00:00:00 2001 From: gstuart Date: Fri, 10 Dec 2021 17:27:44 -0500 Subject: [PATCH] Make Lotus vm gas tracing an env var --- chain/vm/runtime.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chain/vm/runtime.go b/chain/vm/runtime.go index 6e94030bd2a..72f4daab857 100644 --- a/chain/vm/runtime.go +++ b/chain/vm/runtime.go @@ -5,6 +5,7 @@ import ( "context" "encoding/binary" "fmt" + "os" gruntime "runtime" "time" @@ -52,7 +53,7 @@ func (m *Message) ValueReceived() abi.TokenAmount { } // EnableGasTracing, if true, outputs gas tracing in execution traces. -var EnableGasTracing = false +var EnableGasTracing = os.Getenv("LOTUS_VM_ENABLE_GAS_TRACING_VERY_SLOW") == "1" type Runtime struct { rt5.Message