From b99b2c446ca3a81a692eb58294d5a4f6a999f00c Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 5 Jan 2015 17:37:30 +0100 Subject: Precompiled contract & Depth change * Added pre-compiled contract 0x04 (mem cpy) * Changed depth error to return the gas instead of consuming --- core/execution.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/execution.go') diff --git a/core/execution.go b/core/execution.go index a7bb59651..43f4b58fb 100644 --- a/core/execution.go +++ b/core/execution.go @@ -36,7 +36,8 @@ func (self *Execution) exec(code, contextAddr []byte, caller vm.ContextRef) (ret evm := vm.New(env, vm.DebugVmTy) if env.Depth() == vm.MaxCallDepth { - // Consume all gas (by not returning it) and return a depth error + caller.ReturnGas(self.Gas, self.price) + return nil, vm.DepthError{} } -- cgit