Refactored VM to two separate VMs; std & debug

Standard VM should be about 10x faster than the debug VM. Some error
checking has been removed, all of the log statements and therefor quite
some unnecessary if-statements.
This commit is contained in:
obscuren
2014-10-14 11:48:52 +02:00
parent 2e894b668a
commit c5bd32b0ad
13 changed files with 1153 additions and 352 deletions

View File

@ -58,8 +58,7 @@ func (self *Pipe) ExecuteObject(object *Object, data []byte, value, gas, price *
self.Vm.State = self.World().State().Copy()
vm := ethvm.New(NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address()))
vm.Verbose = true
vm := ethvm.New(NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address()), ethvm.Type(ethutil.Config.VmType))
msg := ethvm.NewExecution(vm, object.Address(), data, gas.BigInt(), price.BigInt(), value.BigInt())
ret, err := msg.Exec(object.Address(), initiator)