This commit is contained in:
obscuren
2014-11-15 00:29:27 +01:00
parent 56aa24002d
commit 33afb10b0d
3 changed files with 22 additions and 33 deletions

View File

@ -18,8 +18,10 @@
package main
import (
"fmt"
"os"
"runtime"
"time"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/cmd/utils"
@ -38,6 +40,7 @@ func run() error {
// precedence: code-internal flag default < config file < environment variables < command line
Init() // parsing command line
tstart := time.Now()
config := utils.InitConfig(VmType, ConfigFile, Datadir, "ETH")
utils.InitDataDir(Datadir)
@ -51,14 +54,11 @@ func run() error {
os.Exit(1)
}
keyManager := utils.NewKeyManager(KeyStore, Datadir, db)
// create, import, export keys
utils.KeyTasks(keyManager, KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive)
clientIdentity := utils.NewClientIdentity(ClientIdentifier, Version, Identifier)
ethereum = utils.NewEthereum(db, clientIdentity, keyManager, UseUPnP, OutboundPort, MaxPeer)
if ShowGenesis {
@ -75,7 +75,10 @@ func run() error {
utils.RegisterInterrupt(func(os.Signal) {
gui.Stop()
})
utils.StartEthereum(ethereum, UseSeed)
go utils.StartEthereum(ethereum, UseSeed)
fmt.Println("ETH stack took", time.Since(tstart))
// gui blocks the main thread
gui.Start(AssetPath)