Handle call depth exception for CREATE

This commit is contained in:
Gustav Simonsson 2015-05-18 16:23:20 +02:00
parent 36419defd1
commit 1d51cada3c
1 changed files with 6 additions and 0 deletions

View File

@ -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
}