aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/vm/evm.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/vm/evm.go b/core/vm/evm.go
index 70e1cd1b8..d47b00938 100644
--- a/core/vm/evm.go
+++ b/core/vm/evm.go
@@ -169,6 +169,11 @@ func (evm *EVM) Cancel() {
atomic.StoreInt32(&evm.abort, 1)
}
+// Cancelled returns true if Cancel has been called
+func (evm *EVM) Cancelled() bool {
+ return atomic.LoadInt32(&evm.abort) == 1
+}
+
// Interpreter returns the current interpreter
func (evm *EVM) Interpreter() Interpreter {
return evm.interpreter