aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2019-06-24 16:54:06 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-06-24 16:54:06 +0800
commitf578d41ee6b3087f8021fd561a0b5665aea3dba6 (patch)
tree1aa79736761c5a6f4c5d1cb14c2e11d05b538740 /core/vm
parentcdadf57bf9d25744eaafddea34a4a66fead9f04b (diff)
downloadgo-tangerine-f578d41ee6b3087f8021fd561a0b5665aea3dba6.tar
go-tangerine-f578d41ee6b3087f8021fd561a0b5665aea3dba6.tar.gz
go-tangerine-f578d41ee6b3087f8021fd561a0b5665aea3dba6.tar.bz2
go-tangerine-f578d41ee6b3087f8021fd561a0b5665aea3dba6.tar.lz
go-tangerine-f578d41ee6b3087f8021fd561a0b5665aea3dba6.tar.xz
go-tangerine-f578d41ee6b3087f8021fd561a0b5665aea3dba6.tar.zst
go-tangerine-f578d41ee6b3087f8021fd561a0b5665aea3dba6.zip
core/vm, internal/ethapi: fail on eth_call when it times out, fixes #19186 (#19737)
Diffstat (limited to 'core/vm')
-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