diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-31 21:43:14 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-31 21:43:14 +0800 |
commit | af8f5f0b69f1c359991d12c7708804fe8dd1f944 (patch) | |
tree | dd3d5bea8d57037a2d32fae86c4ba7fcc9161b16 /cmd/mist/debugger.go | |
parent | 0ed1a8b50a9b9726cd57a2731d0405f6949c6188 (diff) | |
download | dexon-af8f5f0b69f1c359991d12c7708804fe8dd1f944.tar.gz dexon-af8f5f0b69f1c359991d12c7708804fe8dd1f944.tar.zst dexon-af8f5f0b69f1c359991d12c7708804fe8dd1f944.zip |
ethstate => state
Diffstat (limited to 'cmd/mist/debugger.go')
-rw-r--r-- | cmd/mist/debugger.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cmd/mist/debugger.go b/cmd/mist/debugger.go index fadc241ff..3fd48eec6 100644 --- a/cmd/mist/debugger.go +++ b/cmd/mist/debugger.go @@ -26,8 +26,8 @@ import ( "github.com/ethereum/go-ethereum/chain" "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/ethstate" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/vm" "gopkg.in/qml.v1" ) @@ -40,7 +40,7 @@ type DebuggerWindow struct { vm *vm.DebugVm Db *Debugger - state *ethstate.State + state *state.State } func NewDebuggerWindow(lib *UiLib) *DebuggerWindow { @@ -141,17 +141,17 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data keyPair = self.lib.eth.KeyManager().KeyPair() ) - state := self.lib.eth.StateManager().TransState() + statedb := self.lib.eth.StateManager().TransState() account := self.lib.eth.StateManager().TransState().GetAccount(keyPair.Address()) - contract := ethstate.NewStateObject([]byte{0}) + contract := statedb.NewStateObject([]byte{0}) contract.SetBalance(value) self.SetAsm(script) block := self.lib.eth.ChainManager().CurrentBlock - callerClosure := vm.NewClosure(ðstate.Message{}, account, contract, script, gas, gasPrice) - env := utils.NewEnv(state, block, account.Address(), value) + callerClosure := vm.NewClosure(&state.Message{}, account, contract, script, gas, gasPrice) + env := utils.NewEnv(statedb, block, account.Address(), value) evm := vm.NewDebugVm(env) evm.Dbg = self.Db @@ -172,7 +172,7 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data } } - state.Reset() + statedb.Reset() if !self.Db.interrupt { self.Db.done = true @@ -267,13 +267,13 @@ type storeVal struct { Key, Value string } -func (self *Debugger) BreakHook(pc int, op vm.OpCode, mem *vm.Memory, stack *vm.Stack, stateObject *ethstate.StateObject) bool { +func (self *Debugger) BreakHook(pc int, op vm.OpCode, mem *vm.Memory, stack *vm.Stack, stateObject *state.StateObject) bool { self.main.Logln("break on instr:", pc) return self.halting(pc, op, mem, stack, stateObject) } -func (self *Debugger) StepHook(pc int, op vm.OpCode, mem *vm.Memory, stack *vm.Stack, stateObject *ethstate.StateObject) bool { +func (self *Debugger) StepHook(pc int, op vm.OpCode, mem *vm.Memory, stack *vm.Stack, stateObject *state.StateObject) bool { return self.halting(pc, op, mem, stack, stateObject) } @@ -285,7 +285,7 @@ func (self *Debugger) BreakPoints() []int64 { return self.breakPoints } -func (d *Debugger) halting(pc int, op vm.OpCode, mem *vm.Memory, stack *vm.Stack, stateObject *ethstate.StateObject) bool { +func (d *Debugger) halting(pc int, op vm.OpCode, mem *vm.Memory, stack *vm.Stack, stateObject *state.StateObject) bool { d.win.Root().Call("setInstruction", pc) d.win.Root().Call("clearMem") d.win.Root().Call("clearStack") |