diff options
author | obscuren <geffobscura@gmail.com> | 2014-02-28 19:20:59 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-02-28 19:20:59 +0800 |
commit | b72d3528bfd090252bbdb538e31eebb519083bcc (patch) | |
tree | af34f0c678fc75dda0d186285240beef9aa5b42c /dev_console.go | |
parent | dba1ba38220c92f96aaeeb2d4cc99c1991220dc4 (diff) | |
parent | 560a7073f457a32c9d053f1a4b20f76d949f519d (diff) | |
download | dexon-b72d3528bfd090252bbdb538e31eebb519083bcc.tar dexon-b72d3528bfd090252bbdb538e31eebb519083bcc.tar.gz dexon-b72d3528bfd090252bbdb538e31eebb519083bcc.tar.bz2 dexon-b72d3528bfd090252bbdb538e31eebb519083bcc.tar.lz dexon-b72d3528bfd090252bbdb538e31eebb519083bcc.tar.xz dexon-b72d3528bfd090252bbdb538e31eebb519083bcc.tar.zst dexon-b72d3528bfd090252bbdb538e31eebb519083bcc.zip |
Merge branch 'release/0.3.0' into develop
Diffstat (limited to 'dev_console.go')
-rw-r--r-- | dev_console.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/dev_console.go b/dev_console.go index 696493cdd..09e06aa22 100644 --- a/dev_console.go +++ b/dev_console.go @@ -179,13 +179,13 @@ func (i *Console) ParseInput(input string) bool { fmt.Println("recipient err:", err) } else { tx := ethchain.NewTransaction(recipient, ethutil.Big(tokens[2]), []string{""}) - data, _ := ethutil.Config.Db.Get([]byte("KeyRing")) - keyRing := ethutil.NewValueFromBytes(data) - tx.Sign(keyRing.Get(0).Bytes()) - fmt.Printf("%x\n", tx.Hash()) + + key := ethutil.Config.Db.GetKeys()[0] + tx.Sign(key.PrivateKey) i.ethereum.TxPool.QueueTransaction(tx) - } + fmt.Printf("%x\n", tx.Hash()) + } case "gettx": addr, _ := hex.DecodeString(tokens[1]) data, _ := ethutil.Config.Db.Get(addr) @@ -200,9 +200,9 @@ func (i *Console) ParseInput(input string) bool { code := ethchain.Compile(i.Editor()) contract := ethchain.NewTransaction(ethchain.ContractAddr, ethutil.Big(tokens[1]), code) - data, _ := ethutil.Config.Db.Get([]byte("KeyRing")) - keyRing := ethutil.NewValueFromBytes(data) - contract.Sign(keyRing.Get(0).Bytes()) + + key := ethutil.Config.Db.GetKeys()[0] + contract.Sign(key.PrivateKey) i.ethereum.TxPool.QueueTransaction(contract) |