forked from cerc-io/plugeth
New VM
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user