aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-11 02:59:12 +0800
committerobscuren <geffobscura@gmail.com>2014-12-11 02:59:12 +0800
commit5553e5aaed5c3f4e303b7d6671d2c92a45aa487e (patch)
treefc4f9c7a088d0af0e3eec76258df89c3e9968ba4 /cmd
parentaf6afbaa56efa15abe6a03665c6674b0e2f591c8 (diff)
downloaddexon-5553e5aaed5c3f4e303b7d6671d2c92a45aa487e.tar
dexon-5553e5aaed5c3f4e303b7d6671d2c92a45aa487e.tar.gz
dexon-5553e5aaed5c3f4e303b7d6671d2c92a45aa487e.tar.bz2
dexon-5553e5aaed5c3f4e303b7d6671d2c92a45aa487e.tar.lz
dexon-5553e5aaed5c3f4e303b7d6671d2c92a45aa487e.tar.xz
dexon-5553e5aaed5c3f4e303b7d6671d2c92a45aa487e.tar.zst
dexon-5553e5aaed5c3f4e303b7d6671d2c92a45aa487e.zip
states moved to chain
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mist/bindings.go2
-rw-r--r--cmd/mist/debugger.go4
-rw-r--r--cmd/mist/gui.go8
-rw-r--r--cmd/mist/ui_lib.go2
4 files changed, 8 insertions, 8 deletions
diff --git a/cmd/mist/bindings.go b/cmd/mist/bindings.go
index 6dbcc3f1d..6d2342c87 100644
--- a/cmd/mist/bindings.go
+++ b/cmd/mist/bindings.go
@@ -103,7 +103,7 @@ func (self *Gui) DumpState(hash, path string) {
var stateDump []byte
if len(hash) == 0 {
- stateDump = self.eth.BlockManager().CurrentState().Dump()
+ stateDump = self.eth.ChainManager().State().Dump()
} else {
var block *types.Block
if hash[0] == '#' {
diff --git a/cmd/mist/debugger.go b/cmd/mist/debugger.go
index ca3ff5af2..d7c584eab 100644
--- a/cmd/mist/debugger.go
+++ b/cmd/mist/debugger.go
@@ -141,8 +141,8 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
keyPair = self.lib.eth.KeyManager().KeyPair()
)
- statedb := self.lib.eth.BlockManager().TransState()
- account := self.lib.eth.BlockManager().TransState().GetAccount(keyPair.Address())
+ statedb := self.lib.eth.ChainManager().TransState()
+ account := self.lib.eth.ChainManager().TransState().GetAccount(keyPair.Address())
contract := statedb.NewStateObject([]byte{0})
contract.SetCode(script)
contract.SetBalance(value)
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go
index 0b03cdc1b..fe066e994 100644
--- a/cmd/mist/gui.go
+++ b/cmd/mist/gui.go
@@ -401,7 +401,7 @@ func (gui *Gui) update() {
generalUpdateTicker := time.NewTicker(500 * time.Millisecond)
statsUpdateTicker := time.NewTicker(5 * time.Second)
- state := gui.eth.BlockManager().TransState()
+ state := gui.eth.ChainManager().TransState()
gui.win.Root().Call("setWalletValue", fmt.Sprintf("%v", ethutil.CurrencyToString(state.GetAccount(gui.address()).Balance())))
@@ -428,14 +428,14 @@ func (gui *Gui) update() {
case core.NewBlockEvent:
gui.processBlock(ev.Block, false)
if bytes.Compare(ev.Block.Coinbase, gui.address()) == 0 {
- gui.setWalletValue(gui.eth.BlockManager().CurrentState().GetAccount(gui.address()).Balance(), nil)
+ gui.setWalletValue(gui.eth.ChainManager().State().GetBalance(gui.address()), nil)
}
case core.TxPreEvent:
tx := ev.Tx
- tstate := gui.eth.BlockManager().TransState()
- cstate := gui.eth.BlockManager().CurrentState()
+ tstate := gui.eth.ChainManager().TransState()
+ cstate := gui.eth.ChainManager().State()
taccount := tstate.GetAccount(gui.address())
caccount := cstate.GetAccount(gui.address())
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go
index 2b5e56646..fdbde50fd 100644
--- a/cmd/mist/ui_lib.go
+++ b/cmd/mist/ui_lib.go
@@ -200,7 +200,7 @@ func (ui *UiLib) AssetPath(p string) string {
func (self *UiLib) StartDbWithContractAndData(contractHash, data string) {
dbWindow := NewDebuggerWindow(self)
- object := self.eth.BlockManager().CurrentState().GetStateObject(ethutil.Hex2Bytes(contractHash))
+ object := self.eth.ChainManager().State().GetStateObject(ethutil.Hex2Bytes(contractHash))
if len(object.Code) > 0 {
dbWindow.SetCode("0x" + ethutil.Bytes2Hex(object.Code))
}