diff options
author | obscuren <geffobscura@gmail.com> | 2014-04-23 17:51:48 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-04-23 17:51:48 +0800 |
commit | b962779a1318138e08c6e84a537fdbc6c9ebfd97 (patch) | |
tree | 38ca5fe5bad13a0d947c38a13bb620ea8b80d2a9 /ethereal/ui/library.go | |
parent | a3c8f83562c7a740ac89e63bf36f2ce44ae6627a (diff) | |
download | dexon-b962779a1318138e08c6e84a537fdbc6c9ebfd97.tar dexon-b962779a1318138e08c6e84a537fdbc6c9ebfd97.tar.gz dexon-b962779a1318138e08c6e84a537fdbc6c9ebfd97.tar.bz2 dexon-b962779a1318138e08c6e84a537fdbc6c9ebfd97.tar.lz dexon-b962779a1318138e08c6e84a537fdbc6c9ebfd97.tar.xz dexon-b962779a1318138e08c6e84a537fdbc6c9ebfd97.tar.zst dexon-b962779a1318138e08c6e84a537fdbc6c9ebfd97.zip |
Minor update and fixes to the gui and console
Diffstat (limited to 'ethereal/ui/library.go')
-rw-r--r-- | ethereal/ui/library.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ethereal/ui/library.go b/ethereal/ui/library.go index 6c6f7557a..b097ddbb2 100644 --- a/ethereal/ui/library.go +++ b/ethereal/ui/library.go @@ -44,6 +44,7 @@ func (lib *EthLib) CreateAndSetPrivKey() (string, string, string, string) { } func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data string) (string, error) { + fmt.Println("Create tx") var hash []byte var contractCreation bool if len(recipient) == 0 { @@ -64,18 +65,21 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data strin // Compile and assemble the given data if contractCreation { mainInput, initInput := ethutil.PreProcess(data) + fmt.Println("Precompile done") + fmt.Println("main", mainInput) mainScript, err := utils.Compile(mainInput) if err != nil { return "", err } + fmt.Println("init", initInput) initScript, err := utils.Compile(initInput) if err != nil { return "", err } - tx = ethchain.NewContractCreationTx(value, gasPrice, mainScript, initScript) + tx = ethchain.NewContractCreationTx(value, gas, gasPrice, mainScript, initScript) } else { - tx = ethchain.NewTransactionMessage(hash, value, gasPrice, gas, nil) + tx = ethchain.NewTransactionMessage(hash, value, gas, gasPrice, nil) } acc := lib.stateManager.GetAddrState(keyPair.Address()) tx.Nonce = acc.Nonce @@ -99,7 +103,6 @@ func (lib *EthLib) GetBlock(hexHash string) *Block { } block := lib.blockChain.GetBlock(hash) - fmt.Println(block) return &Block{Number: int(block.BlockInfo().Number), Hash: ethutil.Hex(block.Hash())} } |