Skip to content

Commit

Permalink
Decrement depth
Browse files Browse the repository at this point in the history
  • Loading branch information
obscuren committed Mar 23, 2015
1 parent f2f65c1 commit ebf4408
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ebf4408

Please sign in to comment.