-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose EnableGasTracing as an env_var #7750
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7750 +/- ##
==========================================
- Coverage 39.57% 39.54% -0.03%
==========================================
Files 640 640
Lines 68468 68468
==========================================
- Hits 27095 27079 -16
- Misses 36722 36738 +16
Partials 4651 4651
Continue to review full report at Codecov.
|
cbec238
to
25420cf
Compare
4e9957e
to
070d17f
Compare
chain/vm/runtime.go
Outdated
@@ -51,8 +52,7 @@ func (m *Message) ValueReceived() abi.TokenAmount { | |||
return m.msg.Value | |||
} | |||
|
|||
// EnableGasTracing, if true, outputs gas tracing in execution traces. | |||
var EnableGasTracing = false | |||
const EnableGasTracingEnvVar = "LOTUS_VM_ENABLE_GAS_TRACING_VERY_SLOW" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd do
const EnableGasTracingEnvVar = "LOTUS_VM_ENABLE_GAS_TRACING_VERY_SLOW" | |
// EnableGasTracing, if true, outputs gas tracing in execution traces. | |
var EnableGasTracing = os.Getenv("LOTUS_VM_ENABLE_GAS_TRACING_VERY_SLOW") == "1" |
So that we don't have to lookup the env var on every gas charge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed, thanks that makes it a lot simpler.
070d17f
to
9108828
Compare
Closes issue #7648