diff options
author | obscuren <geffobscura@gmail.com> | 2014-04-12 00:50:36 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-04-12 00:50:36 +0800 |
commit | 8280dd65e63f5e8abac7ca1c41b337859a40dc49 (patch) | |
tree | 869149293af5b022aeebf076b4db811e167ecfbd /utils | |
parent | 3238894a3ba4767773849eabb7c0892554d32874 (diff) | |
parent | 834e43622c3b467f492fcaa07eafd9ca98edc8a3 (diff) | |
download | dexon-8280dd65e63f5e8abac7ca1c41b337859a40dc49.tar dexon-8280dd65e63f5e8abac7ca1c41b337859a40dc49.tar.gz dexon-8280dd65e63f5e8abac7ca1c41b337859a40dc49.tar.bz2 dexon-8280dd65e63f5e8abac7ca1c41b337859a40dc49.tar.lz dexon-8280dd65e63f5e8abac7ca1c41b337859a40dc49.tar.xz dexon-8280dd65e63f5e8abac7ca1c41b337859a40dc49.tar.zst dexon-8280dd65e63f5e8abac7ca1c41b337859a40dc49.zip |
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
Diffstat (limited to 'utils')
-rw-r--r-- | utils/keys.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/keys.go b/utils/keys.go index 910c8c477..2f39c10b2 100644 --- a/utils/keys.go +++ b/utils/keys.go @@ -12,6 +12,7 @@ func CreateKeyPair(force bool) { pub, prv := secp256k1.GenerateKeyPair() pair := ðutil.Key{PrivateKey: prv, PublicKey: pub} ethutil.Config.Db.Put([]byte("KeyRing"), pair.RlpEncode()) + mne := ethutil.MnemonicEncode(ethutil.Hex(prv)) fmt.Printf(` Generating new address and keypair. @@ -22,8 +23,8 @@ addr: %x prvk: %x pubk: %x ++++++++++++++++++++++++++++++++++++++++++++ - -`, pair.Address(), prv, pub) +save these words so you can restore your account later: %s +`, pair.Address(), prv, pub, mne) } } |