aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--ethereum/flags.go8
-rw-r--r--ethereum/main.go2
-rw-r--r--mist/debugger.go7
-rw-r--r--mist/flags.go8
-rw-r--r--mist/main.go2
-rw-r--r--mist/ui_lib.go12
-rw-r--r--utils/cmd.go7
8 files changed, 35 insertions, 17 deletions
diff --git a/README.md b/README.md
index 364e04c76..d54399177 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
Ethereum
========
-Master [![Build
-Status](http://cpt-obvious.ethercasts.com:8010/buildstatusimage?builder=go-ethereum-master-docker)](http://cpt-obvious.ethercasts.com:8010/builders/go-ethereum-master-docker/builds/-1) Develop [![Build
-Status](http://cpt-obvious.ethercasts.com:8010/buildstatusimage?builder=go-ethereum-develop-docker)](http://cpt-obvious.ethercasts.com:8010/builders/go-ethereum-develop-docker/builds/-1)
+[![Build
+Status](http://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20master%20branch)](http://build.ethdev.com:8010/builders/Linux%20Go%20master%20branch/builds/-1) master [![Build
+Status](http://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](http://build.ethdev.com:8010/builders/Linux%20Go%20develop%20branch/builds/-1) develop
Ethereum Go Client © 2014 Jeffrey Wilcke.
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
diff --git a/mist/debugger.go b/mist/debugger.go
index 9d1de8c42..241635ebe 100644
--- a/mist/debugger.go
+++ b/mist/debugger.go
@@ -20,7 +20,7 @@ type DebuggerWindow struct {
engine *qml.Engine
lib *UiLib
- vm *ethvm.Vm
+ vm *ethvm.DebugVm
Db *Debugger
state *ethstate.State
@@ -37,7 +37,7 @@ func NewDebuggerWindow(lib *UiLib) *DebuggerWindow {
win := component.CreateWindow(nil)
- w := &DebuggerWindow{engine: engine, win: win, lib: lib, vm: &ethvm.Vm{}}
+ w := &DebuggerWindow{engine: engine, win: win, lib: lib, vm: &ethvm.DebugVm{}}
w.Db = NewDebugger(w)
return w
@@ -135,8 +135,7 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
callerClosure := ethvm.NewClosure(&ethstate.Message{}, account, contract, script, gas, gasPrice)
env := utils.NewEnv(state, block, account.Address(), value)
- vm := ethvm.New(env)
- vm.Verbose = true
+ vm := ethvm.NewDebugVm(env)
vm.Dbg = self.Db
self.vm = vm
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)
+ }
}
diff --git a/mist/main.go b/mist/main.go
index 12f8681cf..54c4d4501 100644
--- a/mist/main.go
+++ b/mist/main.go
@@ -21,7 +21,7 @@ func run() error {
// precedence: code-internal flag default < config file < environment variables < command line
Init() // parsing command line
- config := utils.InitConfig(ConfigFile, Datadir, "ETH")
+ config := utils.InitConfig(VmType, ConfigFile, Datadir, "ETH")
utils.InitDataDir(Datadir)
diff --git a/mist/ui_lib.go b/mist/ui_lib.go
index f39b56f0b..27b19763b 100644
--- a/mist/ui_lib.go
+++ b/mist/ui_lib.go
@@ -193,21 +193,21 @@ func (self *UiLib) StartDebugger() {
dbWindow.Show()
}
-func (self *UiLib) NewFilter(object map[string]interface{}) int {
- filter, id := self.eth.InstallFilter(object)
+func (self *UiLib) NewFilter(object map[string]interface{}) (id int) {
+ filter := ethchain.NewFilterFromMap(object, self.eth)
filter.MessageCallback = func(messages ethstate.Messages) {
self.win.Root().Call("invokeFilterCallback", ethpipe.ToJSMessages(messages), id)
}
-
+ id = self.eth.InstallFilter(filter)
return id
}
-func (self *UiLib) NewFilterString(typ string) int {
- filter, id := self.eth.InstallFilter(nil)
+func (self *UiLib) NewFilterString(typ string) (id int) {
+ filter := ethchain.NewFilter(self.eth)
filter.BlockCallback = func(block *ethchain.Block) {
self.win.Root().Call("invokeFilterCallback", "{}", id)
}
-
+ id = self.eth.InstallFilter(filter)
return id
}
diff --git a/utils/cmd.go b/utils/cmd.go
index 700542cae..060e8067b 100644
--- a/utils/cmd.go
+++ b/utils/cmd.go
@@ -118,9 +118,12 @@ func InitLogging(Datadir string, LogFile string, LogLevel int, DebugFile string)
return sys
}
-func InitConfig(ConfigFile string, Datadir string, EnvPrefix string) *ethutil.ConfigManager {
+func InitConfig(vmType int, ConfigFile string, Datadir string, EnvPrefix string) *ethutil.ConfigManager {
InitDataDir(Datadir)
- return ethutil.ReadConfig(ConfigFile, Datadir, EnvPrefix)
+ cfg := ethutil.ReadConfig(ConfigFile, Datadir, EnvPrefix)
+ cfg.VmType = vmType
+
+ return cfg
}
func exit(err error) {