diff options
author | Maran <maran.hidskes@gmail.com> | 2014-05-14 20:04:43 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-05-14 20:04:43 +0800 |
commit | c9db87277be495b3567b2831f2f88b8192edb20f (patch) | |
tree | 3cd3abb22e998fe4ffaf3d3dd3e5571c422d5d69 /ethereum | |
parent | 2c7b625daaf062192db2fa604344f79c1bdbb232 (diff) | |
parent | f18ec51cb3959cc662bfc7b84314cd1d3b1541b5 (diff) | |
download | go-tangerine-c9db87277be495b3567b2831f2f88b8192edb20f.tar.gz go-tangerine-c9db87277be495b3567b2831f2f88b8192edb20f.tar.zst go-tangerine-c9db87277be495b3567b2831f2f88b8192edb20f.zip |
Fix merge conflicts
Diffstat (limited to 'ethereum')
-rw-r--r-- | ethereum/dev_console.go | 8 | ||||
-rw-r--r-- | ethereum/ethereum.go | 15 |
2 files changed, 17 insertions, 6 deletions
diff --git a/ethereum/dev_console.go b/ethereum/dev_console.go index 9bdd58942..5941c03ab 100644 --- a/ethereum/dev_console.go +++ b/ethereum/dev_console.go @@ -173,8 +173,8 @@ func (i *Console) ParseInput(input string) bool { } else { tx := ethchain.NewTransactionMessage(recipient, ethutil.Big(tokens[2]), ethutil.Big(tokens[3]), ethutil.Big(tokens[4]), nil) - key := ethutil.Config.Db.GetKeys()[0] - tx.Sign(key.PrivateKey) + keyPair := ethutil.GetKeyRing().Get(0) + tx.Sign(keyPair.PrivateKey) i.ethereum.TxPool().QueueTransaction(tx) fmt.Printf("%x\n", tx.Hash()) @@ -207,8 +207,8 @@ func (i *Console) ParseInput(input string) bool { contract := ethchain.NewContractCreationTx(ethutil.Big(tokens[0]), ethutil.Big(tokens[1]), ethutil.Big(tokens[1]), mainScript, initScript) - key := ethutil.Config.Db.GetKeys()[0] - contract.Sign(key.PrivateKey) + keyPair := ethutil.GetKeyRing().Get(0) + contract.Sign(keyPair.PrivateKey) i.ethereum.TxPool().QueueTransaction(contract) diff --git a/ethereum/ethereum.go b/ethereum/ethereum.go index 448223c37..d22513972 100644 --- a/ethereum/ethereum.go +++ b/ethereum/ethereum.go @@ -102,8 +102,19 @@ func main() { } os.Exit(0) case ExportKey: - key := ethutil.Config.Db.GetKeys()[0] - logSys.Println(fmt.Sprintf("prvk: %x\n", key.PrivateKey)) + keyPair := ethutil.GetKeyRing().Get(0) + fmt.Printf(` +Generating new address and keypair. +Please keep your keys somewhere save. + +++++++++++++++++ KeyRing +++++++++++++++++++ +addr: %x +prvk: %x +pubk: %x +++++++++++++++++++++++++++++++++++++++++++++ +save these words so you can restore your account later: %s +`, keyPair.Address(), keyPair.PrivateKey, keyPair.PublicKey) + os.Exit(0) case ShowGenesis: logSys.Println(ethereum.BlockChain().Genesis()) |