aboutsummaryrefslogtreecommitdiffstats
path: root/mist/flags.go
diff options
context:
space:
mode:
Diffstat (limited to 'mist/flags.go')
-rw-r--r--mist/flags.go52
1 files changed, 32 insertions, 20 deletions
diff --git a/mist/flags.go b/mist/flags.go
index d2e7d3fb0..68accf1bc 100644
--- a/mist/flags.go
+++ b/mist/flags.go
@@ -3,6 +3,7 @@ package main
import (
"flag"
"fmt"
+ "log"
"os"
"os/user"
"path"
@@ -11,28 +12,33 @@ import (
"bitbucket.org/kardianos/osext"
"github.com/ethereum/eth-go/ethlog"
+ "github.com/ethereum/eth-go/vm"
)
-var Identifier string
-var KeyRing string
-var KeyStore string
-var StartRpc bool
-var RpcPort int
-var UseUPnP bool
-var OutboundPort string
-var ShowGenesis bool
-var AddPeer string
-var MaxPeer int
-var GenAddr bool
-var UseSeed bool
-var SecretFile string
-var ExportDir string
-var NonInteractive bool
-var Datadir string
-var LogFile string
-var ConfigFile string
-var DebugFile string
-var LogLevel int
+var (
+ Identifier string
+ KeyRing string
+ KeyStore string
+ StartRpc bool
+ StartWebSockets bool
+ RpcPort int
+ UseUPnP bool
+ OutboundPort string
+ ShowGenesis bool
+ AddPeer string
+ MaxPeer int
+ GenAddr bool
+ UseSeed bool
+ SecretFile string
+ ExportDir string
+ NonInteractive bool
+ Datadir string
+ LogFile string
+ ConfigFile string
+ DebugFile string
+ LogLevel int
+ VmType int
+)
// flags specific to gui client
var AssetPath string
@@ -75,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)")
@@ -83,6 +90,7 @@ func Init() {
flag.IntVar(&MaxPeer, "maxpeer", 10, "maximum desired peers")
flag.IntVar(&RpcPort, "rpcport", 8080, "port to start json-rpc server on")
flag.BoolVar(&StartRpc, "rpc", false, "start rpc server")
+ flag.BoolVar(&StartWebSockets, "ws", false, "start websocket server")
flag.BoolVar(&NonInteractive, "y", false, "non-interactive mode (say yes to confirmations)")
flag.BoolVar(&UseSeed, "seed", true, "seed peers")
flag.BoolVar(&GenAddr, "genaddr", false, "create a new priv/pub key")
@@ -97,4 +105,8 @@ func Init() {
flag.StringVar(&AssetPath, "asset_path", defaultAssetPath(), "absolute path to GUI assets directory")
flag.Parse()
+
+ if VmType >= int(vm.MaxVmTy) {
+ log.Fatal("Invalid VM type ", VmType)
+ }
}