diff options
author | Ethan Buchman <ethan@coinculture.info> | 2015-02-18 08:25:18 +0800 |
---|---|---|
committer | Ethan Buchman <ethan@coinculture.info> | 2015-02-18 08:25:18 +0800 |
commit | 2ba65f4fbaea49c1e0d99959b0331e09b153f931 (patch) | |
tree | add8cabb05cd7fbf0ba4b4bbaf9460dacfc2082d /vm/common.go | |
parent | 2da367a2bee84d74d1bb0ea1b42d4c22fae486dd (diff) | |
parent | 60318c96d03bcaaf731802b1080a3d87cb482124 (diff) | |
download | go-tangerine-2ba65f4fbaea49c1e0d99959b0331e09b153f931.tar go-tangerine-2ba65f4fbaea49c1e0d99959b0331e09b153f931.tar.gz go-tangerine-2ba65f4fbaea49c1e0d99959b0331e09b153f931.tar.bz2 go-tangerine-2ba65f4fbaea49c1e0d99959b0331e09b153f931.tar.lz go-tangerine-2ba65f4fbaea49c1e0d99959b0331e09b153f931.tar.xz go-tangerine-2ba65f4fbaea49c1e0d99959b0331e09b153f931.tar.zst go-tangerine-2ba65f4fbaea49c1e0d99959b0331e09b153f931.zip |
Merge branch 'develop' of https://github.com/ethereum/go-ethereum into develop
Diffstat (limited to 'vm/common.go')
-rw-r--r-- | vm/common.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vm/common.go b/vm/common.go index ff187001f..45a7187a9 100644 --- a/vm/common.go +++ b/vm/common.go @@ -18,6 +18,18 @@ const ( MaxVmTy ) +func NewVm(env Environment) VirtualMachine { + switch env.VmType() { + case JitVmTy: + return NewJitVm(env) + default: + vmlogger.Infoln("unsupported vm type %d", env.VmType()) + fallthrough + case StdVmTy: + return New(env) + } +} + var ( GasStep = big.NewInt(1) GasSha = big.NewInt(10) |