diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-04 17:57:02 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-04 17:57:02 +0800 |
commit | f59a3b67f69b26f969084e0de165435e80bd8e12 (patch) | |
tree | f92098fa0252484fcdccdaf6075c2842713a2fc9 /cmd | |
parent | 1025d097fd4e5171dadb2c1a8eeb43b7730b13b6 (diff) | |
download | dexon-f59a3b67f69b26f969084e0de165435e80bd8e12.tar dexon-f59a3b67f69b26f969084e0de165435e80bd8e12.tar.gz dexon-f59a3b67f69b26f969084e0de165435e80bd8e12.tar.bz2 dexon-f59a3b67f69b26f969084e0de165435e80bd8e12.tar.lz dexon-f59a3b67f69b26f969084e0de165435e80bd8e12.tar.xz dexon-f59a3b67f69b26f969084e0de165435e80bd8e12.tar.zst dexon-f59a3b67f69b26f969084e0de165435e80bd8e12.zip |
StateManager => BlockManager
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/mist/bindings.go | 2 | ||||
-rw-r--r-- | cmd/mist/debugger.go | 4 | ||||
-rw-r--r-- | cmd/mist/gui.go | 4 | ||||
-rw-r--r-- | cmd/mist/ui_lib.go | 2 | ||||
-rw-r--r-- | cmd/utils/cmd.go | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/cmd/mist/bindings.go b/cmd/mist/bindings.go index 196fd38a1..ebdd8ec73 100644 --- a/cmd/mist/bindings.go +++ b/cmd/mist/bindings.go @@ -108,7 +108,7 @@ func (self *Gui) DumpState(hash, path string) { var stateDump []byte if len(hash) == 0 { - stateDump = self.eth.StateManager().CurrentState().Dump() + stateDump = self.eth.BlockManager().CurrentState().Dump() } else { var block *chain.Block if hash[0] == '#' { diff --git a/cmd/mist/debugger.go b/cmd/mist/debugger.go index 3fd48eec6..a2aae6f0b 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.StateManager().TransState() - account := self.lib.eth.StateManager().TransState().GetAccount(keyPair.Address()) + statedb := self.lib.eth.BlockManager().TransState() + account := self.lib.eth.BlockManager().TransState().GetAccount(keyPair.Address()) contract := statedb.NewStateObject([]byte{0}) contract.SetBalance(value) diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index 8fa068c14..5af1b5c7b 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -396,7 +396,7 @@ func (gui *Gui) update() { generalUpdateTicker := time.NewTicker(500 * time.Millisecond) statsUpdateTicker := time.NewTicker(5 * time.Second) - state := gui.eth.StateManager().TransState() + state := gui.eth.BlockManager().TransState() unconfirmedFunds := new(big.Int) gui.win.Root().Call("setWalletValue", fmt.Sprintf("%v", ethutil.CurrencyToString(state.GetAccount(gui.address()).Balance()))) @@ -428,7 +428,7 @@ func (gui *Gui) update() { case chain.NewBlockEvent: gui.processBlock(ev.Block, false) if bytes.Compare(ev.Block.Coinbase, gui.address()) == 0 { - gui.setWalletValue(gui.eth.StateManager().CurrentState().GetAccount(gui.address()).Balance(), nil) + gui.setWalletValue(gui.eth.BlockManager().CurrentState().GetAccount(gui.address()).Balance(), nil) } case chain.TxPreEvent: diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index db299f18d..bb978707d 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -190,7 +190,7 @@ func (ui *UiLib) AssetPath(p string) string { func (self *UiLib) StartDbWithContractAndData(contractHash, data string) { dbWindow := NewDebuggerWindow(self) - object := self.eth.StateManager().CurrentState().GetStateObject(ethutil.Hex2Bytes(contractHash)) + object := self.eth.BlockManager().CurrentState().GetStateObject(ethutil.Hex2Bytes(contractHash)) if len(object.Code) > 0 { dbWindow.SetCode("0x" + ethutil.Bytes2Hex(object.Code)) } diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index ef2ce8b47..e39655403 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -317,7 +317,7 @@ func BlockDo(ethereum *eth.Ethereum, hash []byte) error { parent := ethereum.ChainManager().GetBlock(block.PrevHash) - _, err := ethereum.StateManager().ApplyDiff(parent.State(), parent, block) + _, err := ethereum.BlockManager().ApplyDiff(parent.State(), parent, block) if err != nil { return err } |