Skip to content

Commit 854a7c3

Browse files
committed
disable step log in pvm
1 parent 95f7b1a commit 854a7c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

PolkaVM/Sources/PolkaVM/Engine.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)