aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum/ethereum.go
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-05-14 20:04:43 +0800
committerMaran <maran.hidskes@gmail.com>2014-05-14 20:04:43 +0800
commitc9db87277be495b3567b2831f2f88b8192edb20f (patch)
tree3cd3abb22e998fe4ffaf3d3dd3e5571c422d5d69 /ethereum/ethereum.go
parent2c7b625daaf062192db2fa604344f79c1bdbb232 (diff)
parentf18ec51cb3959cc662bfc7b84314cd1d3b1541b5 (diff)
downloadgo-tangerine-c9db87277be495b3567b2831f2f88b8192edb20f.tar
go-tangerine-c9db87277be495b3567b2831f2f88b8192edb20f.tar.gz
go-tangerine-c9db87277be495b3567b2831f2f88b8192edb20f.tar.bz2
go-tangerine-c9db87277be495b3567b2831f2f88b8192edb20f.tar.lz
go-tangerine-c9db87277be495b3567b2831f2f88b8192edb20f.tar.xz
go-tangerine-c9db87277be495b3567b2831f2f88b8192edb20f.tar.zst
go-tangerine-c9db87277be495b3567b2831f2f88b8192edb20f.zip
Fix merge conflicts
Diffstat (limited to 'ethereum/ethereum.go')
-rw-r--r--ethereum/ethereum.go15
1 files changed, 13 insertions, 2 deletions
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())