aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-05-18 22:23:20 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-05-18 22:23:20 +0800
commit1d51cada3cd27e2de956cc7e326c6dd8455d8391 (patch)
tree81ab71212284a0b5562f53b7240a772e4688754f /core
parent36419defd1dfa6324ffad1d07e78d0adfd9aa4a4 (diff)
downloadgo-tangerine-1d51cada3cd27e2de956cc7e326c6dd8455d8391.tar.gz
go-tangerine-1d51cada3cd27e2de956cc7e326c6dd8455d8391.tar.zst
go-tangerine-1d51cada3cd27e2de956cc7e326c6dd8455d8391.zip
Handle call depth exception for CREATE
Diffstat (limited to 'core')
-rw-r--r--core/execution.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/execution.go b/core/execution.go
index 9adf98032..522c90449 100644
--- a/core/execution.go
+++ b/core/execution.go
@@ -38,6 +38,12 @@ func (self *Execution) Create(caller vm.ContextRef) (ret []byte, err error, acco
code := self.input
self.input = nil
ret, err = self.exec(nil, code, caller)
+ // Here we get an error if we run into maximum stack depth,
+ // See: https://github.com/ethereum/yellowpaper/pull/131
+ // and YP definitions for CREATE instruction
+ if err != nil {
+ return nil, err, nil
+ }
account = self.env.State().GetStateObject(*self.address)
return
}