diff options
author | obscuren <geffobscura@gmail.com> | 2014-06-20 06:42:53 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-06-20 06:42:53 +0800 |
commit | c89566a42f984e4441c3398c3c136baa7cd46ac4 (patch) | |
tree | 9596411f7e6a9ed17ffb6e199e9c691be2b47704 /ethereal | |
parent | 3ec0c719b99b6b14ed6c13128b2caec723bc4a93 (diff) | |
download | dexon-c89566a42f984e4441c3398c3c136baa7cd46ac4.tar.gz dexon-c89566a42f984e4441c3398c3c136baa7cd46ac4.tar.zst dexon-c89566a42f984e4441c3398c3c136baa7cd46ac4.zip |
Removed old debugger code
Diffstat (limited to 'ethereal')
-rw-r--r-- | ethereal/ui/debugger.go | 3 | ||||
-rw-r--r-- | ethereal/ui/ui_lib.go | 51 |
2 files changed, 2 insertions, 52 deletions
diff --git a/ethereal/ui/debugger.go b/ethereal/ui/debugger.go index 9ebfc5fe7..9d60c7587 100644 --- a/ethereal/ui/debugger.go +++ b/ethereal/ui/debugger.go @@ -109,8 +109,9 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data block := self.lib.eth.BlockChain().CurrentBlock vm := ethchain.NewVm(state, self.lib.eth.StateManager(), ethchain.RuntimeVars{ + Block: block, Origin: account.Address(), - BlockNumber: block.BlockInfo().Number, + BlockNumber: block.Number, PrevHash: block.PrevHash, Coinbase: block.Coinbase, Time: block.Time, diff --git a/ethereal/ui/ui_lib.go b/ethereal/ui/ui_lib.go index 9f2cca1e0..791d4fe09 100644 --- a/ethereal/ui/ui_lib.go +++ b/ethereal/ui/ui_lib.go @@ -3,7 +3,6 @@ package ethui import ( "bitbucket.org/kardianos/osext" "github.com/ethereum/eth-go" - "github.com/ethereum/eth-go/ethchain" "github.com/ethereum/eth-go/ethutil" "github.com/go-qml/qml" "os" @@ -138,53 +137,3 @@ func DefaultAssetPath() string { return base } - -func (ui *UiLib) DebugTx(recipient, valueStr, gasStr, gasPriceStr, data string) { - state := ui.eth.BlockChain().CurrentBlock.State() - - script, err := ethutil.Compile(data) - if err != nil { - ethutil.Config.Log.Debugln(err) - - return - } - - dis := ethchain.Disassemble(script) - ui.win.Root().Call("clearAsm") - - for _, str := range dis { - ui.win.Root().Call("setAsm", str) - } - // Contract addr as test address - keyPair := ethutil.GetKeyRing().Get(0) - callerTx := - ethchain.NewContractCreationTx(ethutil.Big(valueStr), ethutil.Big(gasStr), ethutil.Big(gasPriceStr), script) - callerTx.Sign(keyPair.PrivateKey) - - account := ui.eth.StateManager().TransState().GetStateObject(keyPair.Address()) - contract := ethchain.MakeContract(callerTx, state) - callerClosure := ethchain.NewClosure(account, contract, contract.Init(), state, ethutil.Big(gasStr), ethutil.Big(gasPriceStr)) - - block := ui.eth.BlockChain().CurrentBlock - vm := ethchain.NewVm(state, ui.eth.StateManager(), ethchain.RuntimeVars{ - Origin: account.Address(), - BlockNumber: block.BlockInfo().Number, - PrevHash: block.PrevHash, - Coinbase: block.Coinbase, - Time: block.Time, - Diff: block.Difficulty, - }) - - ui.Db.done = false - go func() { - callerClosure.Call(vm, contract.Init(), ui.Db.halting) - - state.Reset() - - ui.Db.done = true - }() -} - -func (ui *UiLib) Next() { - ui.Db.Next() -} |