main loop uses new flags and common methods in util: db, keymanager set up; passes KeyRing/Session string to gui

This commit is contained in:
zelig 2014-06-29 20:32:31 +01:00
parent 12fbb7ae5c
commit e43e4ff2c1
1 changed files with 7 additions and 3 deletions

View File

@ -30,10 +30,14 @@ func main() {
utils.InitLogging(Datadir, LogFile, LogLevel, DebugFile)
ethereum := utils.NewEthereum(UseUPnP, OutboundPort, MaxPeer)
db := utils.NewDatabase()
keyManager := utils.NewKeyManager(KeyStore, Datadir, db)
// create, import, export keys
utils.KeyTasks(GenAddr, ImportKey, ExportKey, NonInteractive)
utils.KeyTasks(keyManager, KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive)
ethereum := utils.NewEthereum(db, keyManager, UseUPnP, OutboundPort, MaxPeer)
if ShowGenesis {
utils.ShowGenesis(ethereum)
@ -43,7 +47,7 @@ func main() {
utils.StartRpc(ethereum, RpcPort)
}
gui := ethui.New(ethereum, LogLevel)
gui := ethui.New(ethereum, KeyRing, LogLevel)
utils.RegisterInterrupt(func(os.Signal) {
gui.Stop()