diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-05-18 22:23:20 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-05-18 22:23:20 +0800 |
commit | 1d51cada3cd27e2de956cc7e326c6dd8455d8391 (patch) | |
tree | 81ab71212284a0b5562f53b7240a772e4688754f /core | |
parent | 36419defd1dfa6324ffad1d07e78d0adfd9aa4a4 (diff) | |
download | dexon-1d51cada3cd27e2de956cc7e326c6dd8455d8391.tar dexon-1d51cada3cd27e2de956cc7e326c6dd8455d8391.tar.gz dexon-1d51cada3cd27e2de956cc7e326c6dd8455d8391.tar.bz2 dexon-1d51cada3cd27e2de956cc7e326c6dd8455d8391.tar.lz dexon-1d51cada3cd27e2de956cc7e326c6dd8455d8391.tar.xz dexon-1d51cada3cd27e2de956cc7e326c6dd8455d8391.tar.zst dexon-1d51cada3cd27e2de956cc7e326c6dd8455d8391.zip |
Handle call depth exception for CREATE
Diffstat (limited to 'core')
-rw-r--r-- | core/execution.go | 6 |
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 } |