aboutsummaryrefslogtreecommitdiffstats
path: root/core/state_transition.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-11 23:33:39 +0800
committerobscuren <geffobscura@gmail.com>2015-03-11 23:33:39 +0800
commit477815c04451542a7301511e23009d6728e59ee5 (patch)
tree779eac418d9a216b3d2c763c14bd2bd8a6ca6166 /core/state_transition.go
parent6b63759ded5766396029445af772e35e3b8c1c67 (diff)
downloadgo-tangerine-477815c04451542a7301511e23009d6728e59ee5.tar.gz
go-tangerine-477815c04451542a7301511e23009d6728e59ee5.tar.zst
go-tangerine-477815c04451542a7301511e23009d6728e59ee5.zip
Improved error reporting and removed commented code
Diffstat (limited to 'core/state_transition.go')
-rw-r--r--core/state_transition.go33
1 files changed, 1 insertions, 32 deletions
diff --git a/core/state_transition.go b/core/state_transition.go
index 9b67de149..b1c66d8c9 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -184,6 +184,7 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) {
}
}
if err = self.UseGas(big.NewInt(dgas)); err != nil {
+ println("2")
return nil, InvalidTxError(err)
}
@@ -200,46 +201,14 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) {
ref.SetCode(ret)
}
}
-
- /*
- if vmenv, ok := vmenv.(*VMEnv); ok && tryJit {
- statelogger.Infof("CREATE: re-running using JIT (PH=%x)\n", stateCopy.Root()[:4])
- // re-run using the JIT (validation for the JIT)
- goodState := vmenv.State().Copy()
- vmenv.state = stateCopy
- vmenv.SetVmType(vm.JitVmTy)
- vmenv.Create(sender, contract.Address(), self.msg.Data(), self.gas, self.gasPrice, self.value)
- statelogger.Infof("DONE PH=%x STD_H=%x JIT_H=%x\n", stateCopy.Root()[:4], goodState.Root()[:4], vmenv.State().Root()[:4])
- self.state.Set(goodState)
- }
- */
} else {
ret, err = vmenv.Call(self.From(), self.To().Address(), self.msg.Data(), self.gas, self.gasPrice, self.value)
-
- /*
- if vmenv, ok := vmenv.(*VMEnv); ok && tryJit {
- statelogger.Infof("CALL: re-running using JIT (PH=%x)\n", stateCopy.Root()[:4])
- // re-run using the JIT (validation for the JIT)
- goodState := vmenv.State().Copy()
- vmenv.state = stateCopy
- vmenv.SetVmType(vm.JitVmTy)
- vmenv.Call(self.From(), self.To().Address(), self.msg.Data(), self.gas, self.gasPrice, self.value)
- statelogger.Infof("DONE PH=%x STD_H=%x JIT_H=%x\n", stateCopy.Root()[:4], goodState.Root()[:4], vmenv.State().Root()[:4])
- self.state.Set(goodState)
- }
- */
}
if err != nil && IsValueTransferErr(err) {
return nil, InvalidTxError(err)
}
- /*
- if err != nil {
- self.UseGas(self.gas)
- }
- */
-
return
}