diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-04 00:06:54 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-04 00:06:54 +0800 |
commit | 99853ac3ce57807deb4822dd324186e1d2ee0821 (patch) | |
tree | 4c7dc0c8fa1f83d1081f429fa3175b03c9011101 /vm/virtual_machine.go | |
parent | 82405501872385b240012070bad2f0eda643d423 (diff) | |
download | go-tangerine-99853ac3ce57807deb4822dd324186e1d2ee0821.tar.gz go-tangerine-99853ac3ce57807deb4822dd324186e1d2ee0821.tar.zst go-tangerine-99853ac3ce57807deb4822dd324186e1d2ee0821.zip |
Moved execution from vm to chain.
This moves call and create to the specified environments. Vms are no
longer re-used. Vm uses environment's Call(Code) and Create in order to
execute new contracts or transfer value between accounts.
State transition now uses the same mechanism described above.
Diffstat (limited to 'vm/virtual_machine.go')
-rw-r--r-- | vm/virtual_machine.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vm/virtual_machine.go b/vm/virtual_machine.go index cc8cd39a9..5738075fb 100644 --- a/vm/virtual_machine.go +++ b/vm/virtual_machine.go @@ -1,8 +1,10 @@ package vm +import "math/big" + type VirtualMachine interface { Env() Environment - RunClosure(*Closure) ([]byte, error) + Run(me, caller ClosureRef, code []byte, value, gas, price *big.Int, data []byte) ([]byte, error) Depth() int Printf(string, ...interface{}) VirtualMachine Endl() VirtualMachine |