diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-07 20:17:48 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-07 20:17:48 +0800 |
commit | fed3e6a808921fb8274b50043c5c39a24a1bbccf (patch) | |
tree | d632e95cfce78bd9a99a52bf7f30ee3ff980dfd3 /cmd/mist | |
parent | 032ab665299d75bffc25260e8fa477ace19db06a (diff) | |
download | dexon-fed3e6a808921fb8274b50043c5c39a24a1bbccf.tar dexon-fed3e6a808921fb8274b50043c5c39a24a1bbccf.tar.gz dexon-fed3e6a808921fb8274b50043c5c39a24a1bbccf.tar.bz2 dexon-fed3e6a808921fb8274b50043c5c39a24a1bbccf.tar.lz dexon-fed3e6a808921fb8274b50043c5c39a24a1bbccf.tar.xz dexon-fed3e6a808921fb8274b50043c5c39a24a1bbccf.tar.zst dexon-fed3e6a808921fb8274b50043c5c39a24a1bbccf.zip |
Refactored ethutil.Config.Db out
Diffstat (limited to 'cmd/mist')
-rw-r--r-- | cmd/mist/bindings.go | 3 | ||||
-rw-r--r-- | cmd/mist/gui.go | 19 |
2 files changed, 5 insertions, 17 deletions
diff --git a/cmd/mist/bindings.go b/cmd/mist/bindings.go index e91a157dc..f6d1c40da 100644 --- a/cmd/mist/bindings.go +++ b/cmd/mist/bindings.go @@ -29,6 +29,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/state" ) type plugin struct { @@ -121,7 +122,7 @@ func (self *Gui) DumpState(hash, path string) { return } - stateDump = block.State().Dump() + stateDump = state.New(block.Root(), self.eth.Db()).Dump() } file, err := os.OpenFile(path[7:], os.O_CREATE|os.O_RDWR, os.ModePerm) diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index 26239c4db..2e3f329b2 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -117,18 +117,7 @@ func (gui *Gui) Start(assetPath string) { context.SetVar("eth", gui.uiLib) context.SetVar("shh", gui.whisper) - // Load the main QML interface - data, _ := ethutil.Config.Db.Get([]byte("KeyRing")) - - var win *qml.Window - var err error - var addlog = false - if len(data) == 0 { - win, err = gui.showKeyImport(context) - } else { - win, err = gui.showWallet(context) - addlog = true - } + win, err := gui.showWallet(context) if err != nil { guilogger.Errorln("asset not found: you can set an alternative asset path on the command line using option 'asset_path'", err) @@ -139,9 +128,7 @@ func (gui *Gui) Start(assetPath string) { win.Show() // only add the gui guilogger after window is shown otherwise slider wont be shown - if addlog { - logger.AddLogSystem(gui) - } + logger.AddLogSystem(gui) win.Wait() // need to silence gui guilogger after window closed otherwise logsystem hangs (but do not save loglevel) @@ -275,7 +262,7 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) { } var ( - ptx = xeth.NewJSTx(tx, gui.xeth.World().State()) + ptx = xeth.NewJSTx(tx) send = nameReg.Storage(tx.From()) rec = nameReg.Storage(tx.To()) s, r string |