aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-24 04:48:31 +0800
committerobscuren <geffobscura@gmail.com>2015-03-24 04:48:31 +0800
commitebf4408d738474835582485bb4ef45bf55a05a9c (patch)
treeed05f198152e5976c2f676ea031cb820797907e0 /core
parentf2f65c1a65d39a31fa0c6ed574fb2a6e213de5d4 (diff)
downloadgo-tangerine-ebf4408d738474835582485bb4ef45bf55a05a9c.tar.gz
go-tangerine-ebf4408d738474835582485bb4ef45bf55a05a9c.tar.zst
go-tangerine-ebf4408d738474835582485bb4ef45bf55a05a9c.zip
Decrement depth
Diffstat (limited to 'core')
-rw-r--r--core/vm/vm.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/vm/vm.go b/core/vm/vm.go
index f4bf1ca72..2ece5b928 100644
--- a/core/vm/vm.go
+++ b/core/vm/vm.go
@@ -5,8 +5,8 @@ import (
"math/big"
"github.com/ethereum/go-ethereum/common"
- "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/core/state"
+ "github.com/ethereum/go-ethereum/crypto"
)
type Vm struct {
@@ -34,6 +34,8 @@ func New(env Environment) *Vm {
func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) {
self.env.SetDepth(self.env.Depth() + 1)
+ defer self.env.SetDepth(self.env.Depth() - 1)
+
var (
caller = context.caller
code = context.Code