aboutsummaryrefslogtreecommitdiffstats
path: root/dev_console.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-28 19:17:26 +0800
committerobscuren <geffobscura@gmail.com>2014-02-28 19:17:26 +0800
commit075acec9e709d3cda8a791cb0829720f5a1ae142 (patch)
tree302e3a225fa1bf9ff8192b8ee12e07a4b16263f2 /dev_console.go
parent5e7f8cca4f83566fdfbd1eb76c8b565094958e6c (diff)
downloadgo-tangerine-075acec9e709d3cda8a791cb0829720f5a1ae142.tar
go-tangerine-075acec9e709d3cda8a791cb0829720f5a1ae142.tar.gz
go-tangerine-075acec9e709d3cda8a791cb0829720f5a1ae142.tar.bz2
go-tangerine-075acec9e709d3cda8a791cb0829720f5a1ae142.tar.lz
go-tangerine-075acec9e709d3cda8a791cb0829720f5a1ae142.tar.xz
go-tangerine-075acec9e709d3cda8a791cb0829720f5a1ae142.tar.zst
go-tangerine-075acec9e709d3cda8a791cb0829720f5a1ae142.zip
Changed to new get keys method on database interface
Diffstat (limited to 'dev_console.go')
-rw-r--r--dev_console.go16
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)