From 954081578fd28bcb08e8d5b9fc8140618a86ae6a Mon Sep 17 00:00:00 2001 From: jangko Date: Mon, 24 Oct 2022 17:36:49 +0700 Subject: [PATCH] add enabledTracing accessor to BaseVMState --- nimbus/vm2/state.nim | 3 +++ nimbus/vm_state.nim | 1 + 2 files changed, 4 insertions(+) diff --git a/nimbus/vm2/state.nim b/nimbus/vm2/state.nim index 8f0b9e62f..cfd3b1f10 100644 --- a/nimbus/vm2/state.nim +++ b/nimbus/vm2/state.nim @@ -389,6 +389,9 @@ proc enableTracing*(vmState: BaseVMState) = proc disableTracing*(vmState: BaseVMState) = vmState.tracer.flags.excl EnableTracing +func tracingEnabled*(vmState: BaseVMState): bool = + EnableTracing in vmState.tracer.flags + iterator tracedAccounts*(vmState: BaseVMState): EthAddress = for acc in vmState.tracer.accounts: yield acc diff --git a/nimbus/vm_state.nim b/nimbus/vm_state.nim index 2848019c5..cd48070ed 100644 --- a/nimbus/vm_state.nim +++ b/nimbus/vm_state.nim @@ -22,6 +22,7 @@ export vms.difficulty, vms.disableTracing, vms.enableTracing, + vms.tracingEnabled, vms.baseFee, vms.generateWitness, vms.`generateWitness=`,