File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,12 @@ public class Engine {
88 let config : PvmConfig
99 let invocationContext : ( any InvocationContext ) ?
1010 private var stepCounter : Int = 0
11+ private let enableStepLogging : Bool
1112
1213 public init ( config: PvmConfig , invocationContext: ( any InvocationContext ) ? = nil ) {
1314 self . config = config
1415 self . invocationContext = invocationContext
16+ enableStepLogging = ProcessInfo . processInfo. environment [ " PVM_STEP_LOGGING " ] != nil
1517 }
1618
1719 public func execute( state: any VMState ) async -> ExitReason {
@@ -75,7 +77,9 @@ public class Engine {
7577 // context.state.consumeGas(blockGas)
7678 // }
7779
78- logStep ( pc: pc, instruction: inst, context: context)
80+ if enableStepLogging {
81+ logStep ( pc: pc, instruction: inst, context: context)
82+ }
7983
8084 return inst. execute ( context: context, skip: skip)
8185 }
You can’t perform that action at this time.
0 commit comments