aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2014-06-30 03:32:31 +0800
committerzelig <viktor.tron@gmail.com>2014-06-30 03:32:31 +0800
commite43e4ff2c1d882ec96424ced1cf8980e14636afd (patch)
tree4c39623d374657bdf88f7f02f30887bba4cbbebf /ethereal
parent12fbb7ae5ceb3c06fb7c4611e82d7cb10cea06be (diff)
downloaddexon-e43e4ff2c1d882ec96424ced1cf8980e14636afd.tar.gz
dexon-e43e4ff2c1d882ec96424ced1cf8980e14636afd.tar.zst
dexon-e43e4ff2c1d882ec96424ced1cf8980e14636afd.zip
main loop uses new flags and common methods in util: db, keymanager set up; passes KeyRing/Session string to gui
Diffstat (limited to 'ethereal')
-rw-r--r--ethereal/main.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/ethereal/main.go b/ethereal/main.go
index 316f2285f..82427f088 100644
--- a/ethereal/main.go
+++ b/ethereal/main.go
@@ -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()