diff options
author | obscuren <geffobscura@gmail.com> | 2014-02-03 09:01:31 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-02-03 09:01:31 +0800 |
commit | 5e36e3ccc7fad6d0b40c7f95be4f02e0cafdb2e2 (patch) | |
tree | c6bcde3434499f2435a87480b142e16867ca6e67 /dev_console.go | |
parent | ec883db3b1172f75761c066d4b022858d1f9df5d (diff) | |
download | go-tangerine-5e36e3ccc7fad6d0b40c7f95be4f02e0cafdb2e2.tar go-tangerine-5e36e3ccc7fad6d0b40c7f95be4f02e0cafdb2e2.tar.gz go-tangerine-5e36e3ccc7fad6d0b40c7f95be4f02e0cafdb2e2.tar.bz2 go-tangerine-5e36e3ccc7fad6d0b40c7f95be4f02e0cafdb2e2.tar.lz go-tangerine-5e36e3ccc7fad6d0b40c7f95be4f02e0cafdb2e2.tar.xz go-tangerine-5e36e3ccc7fad6d0b40c7f95be4f02e0cafdb2e2.tar.zst go-tangerine-5e36e3ccc7fad6d0b40c7f95be4f02e0cafdb2e2.zip |
Process transactions
Diffstat (limited to 'dev_console.go')
-rw-r--r-- | dev_console.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/dev_console.go b/dev_console.go index f93300aad..e93b39c3a 100644 --- a/dev_console.go +++ b/dev_console.go @@ -144,11 +144,15 @@ func (i *Console) ParseInput(input string) bool { case "encode": fmt.Printf("%q\n", ethutil.Encode(tokens[1])) case "tx": - recipient, _ := hex.DecodeString(tokens[1]) - tx := ethchain.NewTransaction(recipient, ethutil.Big(tokens[2]), []string{""}) - fmt.Printf("%x\n", tx.Hash()) + recipient, err := hex.DecodeString(tokens[1]) + if err != nil { + fmt.Println("recipient err:", err) + } else { + tx := ethchain.NewTransaction(recipient, ethutil.Big(tokens[2]), []string{""}) + fmt.Printf("%x\n", tx.Hash()) + i.ethereum.TxPool.QueueTransaction(tx) + } - i.ethereum.TxPool.QueueTransaction(tx) case "gettx": addr, _ := hex.DecodeString(tokens[1]) data, _ := ethutil.Config.Db.Get(addr) |