aboutsummaryrefslogtreecommitdiffstats
path: root/mist/flags.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-14 17:49:15 +0800
committerobscuren <geffobscura@gmail.com>2014-10-14 17:49:15 +0800
commit294b4374148fb2afa019779a4ef17bec5d4c3665 (patch)
tree86c5ce9f99bf94f7bc8cf222ffea8eae1878b53e /mist/flags.go
parent03e082d4acc89f3dd59b9ab17be75838705b0b9a (diff)
downloaddexon-294b4374148fb2afa019779a4ef17bec5d4c3665.tar
dexon-294b4374148fb2afa019779a4ef17bec5d4c3665.tar.gz
dexon-294b4374148fb2afa019779a4ef17bec5d4c3665.tar.bz2
dexon-294b4374148fb2afa019779a4ef17bec5d4c3665.tar.lz
dexon-294b4374148fb2afa019779a4ef17bec5d4c3665.tar.xz
dexon-294b4374148fb2afa019779a4ef17bec5d4c3665.tar.zst
dexon-294b4374148fb2afa019779a4ef17bec5d4c3665.zip
New VM
Diffstat (limited to 'mist/flags.go')
-rw-r--r--mist/flags.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/mist/flags.go b/mist/flags.go
index a56d689c0..5cf34c740 100644
--- a/mist/flags.go
+++ b/mist/flags.go
@@ -3,6 +3,7 @@ package main
import (
"flag"
"fmt"
+ "log"
"os"
"os/user"
"path"
@@ -11,6 +12,7 @@ import (
"bitbucket.org/kardianos/osext"
"github.com/ethereum/eth-go/ethlog"
+ "github.com/ethereum/eth-go/ethvm"
)
var (
@@ -35,6 +37,7 @@ var (
ConfigFile string
DebugFile string
LogLevel int
+ VmType int
)
// flags specific to gui client
@@ -78,6 +81,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)")
@@ -101,4 +105,8 @@ func Init() {
flag.StringVar(&AssetPath, "asset_path", defaultAssetPath(), "absolute path to GUI assets directory")
flag.Parse()
+
+ if VmType >= int(ethvm.MaxVmTy) {
+ log.Fatal("Invalid VM type ", VmType)
+ }
}