diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-14 17:49:15 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-14 17:49:15 +0800 |
commit | 294b4374148fb2afa019779a4ef17bec5d4c3665 (patch) | |
tree | 86c5ce9f99bf94f7bc8cf222ffea8eae1878b53e /ethereum | |
parent | 03e082d4acc89f3dd59b9ab17be75838705b0b9a (diff) | |
download | go-tangerine-294b4374148fb2afa019779a4ef17bec5d4c3665.tar go-tangerine-294b4374148fb2afa019779a4ef17bec5d4c3665.tar.gz go-tangerine-294b4374148fb2afa019779a4ef17bec5d4c3665.tar.bz2 go-tangerine-294b4374148fb2afa019779a4ef17bec5d4c3665.tar.lz go-tangerine-294b4374148fb2afa019779a4ef17bec5d4c3665.tar.xz go-tangerine-294b4374148fb2afa019779a4ef17bec5d4c3665.tar.zst go-tangerine-294b4374148fb2afa019779a4ef17bec5d4c3665.zip |
New VM
Diffstat (limited to 'ethereum')
-rw-r--r-- | ethereum/flags.go | 8 | ||||
-rw-r--r-- | ethereum/main.go | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ethereum/flags.go b/ethereum/flags.go index 58220f4e6..7924dd7bf 100644 --- a/ethereum/flags.go +++ b/ethereum/flags.go @@ -3,11 +3,13 @@ package main import ( "flag" "fmt" + "log" "os" "os/user" "path" "github.com/ethereum/eth-go/ethlog" + "github.com/ethereum/eth-go/ethvm" ) var ( @@ -37,6 +39,7 @@ var ( Dump bool DumpHash string DumpNumber int + VmType int ) // flags specific to cli client @@ -59,6 +62,7 @@ func Init() { flag.PrintDefaults() } + flag.IntVar(&VmType, "vm", 0, "Virtual Machine type: 0-1: standard, debug") flag.StringVar(&Identifier, "id", "", "Custom client identifier") flag.StringVar(&KeyRing, "keyring", "", "identifier for keyring to use") flag.StringVar(&KeyStore, "keystore", "db", "system to store keyrings: db|file (db)") @@ -91,5 +95,9 @@ func Init() { flag.Parse() + if VmType >= int(ethvm.MaxVmTy) { + log.Fatal("Invalid VM type ", VmType) + } + InputFile = flag.Arg(0) } diff --git a/ethereum/main.go b/ethereum/main.go index 6a9af6b96..b8f8ce39a 100644 --- a/ethereum/main.go +++ b/ethereum/main.go @@ -31,7 +31,7 @@ func main() { LogLevel = 0 } - utils.InitConfig(ConfigFile, Datadir, "ETH") + utils.InitConfig(VmType, ConfigFile, Datadir, "ETH") ethutil.Config.Diff = DiffTool ethutil.Config.DiffType = DiffType |