aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/ethereum.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-15 03:34:21 +0800
committerobscuren <geffobscura@gmail.com>2014-05-15 03:34:21 +0800
commit942f552c620471602326c1ded54095c1cf41ed76 (patch)
treecbc1f21a967bb522afad6c891afb4c4628f16ab4 /ethereal/ethereum.go
parent809b4ae0f68da7a6904208662dc316cd669184fe (diff)
parenta73ae8727d38391c6975a9fa149043e6c69a2f30 (diff)
downloadgo-tangerine-942f552c620471602326c1ded54095c1cf41ed76.tar.gz
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.go28
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)