diff options
author | zelig <viktor.tron@gmail.com> | 2014-06-23 19:06:45 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-06-23 19:06:45 +0800 |
commit | c67cdab22162792f40cb366cbf12960c306aa835 (patch) | |
tree | ac220944d05ff384b8d3c79a56c709b705fbac05 /ethereal/ui/ui_lib.go | |
parent | d060ae6a368bb880132e548c58b33e2508adc125 (diff) | |
parent | 2408e38218d81c567bdaa4671a542a20c55490b9 (diff) | |
download | go-tangerine-c67cdab22162792f40cb366cbf12960c306aa835.tar go-tangerine-c67cdab22162792f40cb366cbf12960c306aa835.tar.gz go-tangerine-c67cdab22162792f40cb366cbf12960c306aa835.tar.bz2 go-tangerine-c67cdab22162792f40cb366cbf12960c306aa835.tar.lz go-tangerine-c67cdab22162792f40cb366cbf12960c306aa835.tar.xz go-tangerine-c67cdab22162792f40cb366cbf12960c306aa835.tar.zst go-tangerine-c67cdab22162792f40cb366cbf12960c306aa835.zip |
merge upstream
Diffstat (limited to 'ethereal/ui/ui_lib.go')
-rw-r--r-- | ethereal/ui/ui_lib.go | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/ethereal/ui/ui_lib.go b/ethereal/ui/ui_lib.go index eb607aac5..2dd66f4fd 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 { - logger.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() -} |