diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-15 03:34:21 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-15 03:34:21 +0800 |
commit | 942f552c620471602326c1ded54095c1cf41ed76 (patch) | |
tree | cbc1f21a967bb522afad6c891afb4c4628f16ab4 /ethereal/ethereum.go | |
parent | 809b4ae0f68da7a6904208662dc316cd669184fe (diff) | |
parent | a73ae8727d38391c6975a9fa149043e6c69a2f30 (diff) | |
download | go-tangerine-942f552c620471602326c1ded54095c1cf41ed76.tar go-tangerine-942f552c620471602326c1ded54095c1cf41ed76.tar.gz go-tangerine-942f552c620471602326c1ded54095c1cf41ed76.tar.bz2 go-tangerine-942f552c620471602326c1ded54095c1cf41ed76.tar.lz go-tangerine-942f552c620471602326c1ded54095c1cf41ed76.tar.xz go-tangerine-942f552c620471602326c1ded54095c1cf41ed76.tar.zst go-tangerine-942f552c620471602326c1ded54095c1cf41ed76.zip |
Merge branch 'release/poc5-rc6'poc5-rc6
Diffstat (limited to 'ethereal/ethereum.go')
-rw-r--r-- | ethereal/ethereum.go | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/ethereal/ethereum.go b/ethereal/ethereum.go index 15a454bdf..98fab18e3 100644 --- a/ethereal/ethereum.go +++ b/ethereal/ethereum.go @@ -4,8 +4,6 @@ import ( "fmt" "github.com/ethereum/eth-go" "github.com/ethereum/eth-go/ethchain" - "github.com/ethereum/eth-go/ethpub" - "github.com/ethereum/eth-go/ethrpc" "github.com/ethereum/eth-go/ethutil" "github.com/ethereum/go-ethereum/ethereal/ui" "github.com/ethereum/go-ethereum/utils" @@ -89,8 +87,19 @@ func main() { } if ExportKey { - key := ethutil.Config.Db.GetKeys()[0] - fmt.Printf("%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) } @@ -99,13 +108,12 @@ func main() { os.Exit(0) } + if StartMining { + utils.DoMining(ethereum) + } + if StartRpc { - ethereum.RpcServer, err = ethrpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum), RpcPort) - if err != nil { - log.Println("Could not start RPC interface:", err) - } else { - go ethereum.RpcServer.Start() - } + utils.DoRpc(ethereum, RpcPort) } log.Printf("Starting Ethereum GUI v%s\n", ethutil.Config.Ver) |