aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-05 00:09:47 +0800
committerobscuren <geffobscura@gmail.com>2014-12-05 00:09:47 +0800
commit085f604b27c8b3fbd82f2aa9d02a4251df0d5db5 (patch)
tree2d078c12dbe16380d66bb8f90eacf64e2062b178
parenta5b27bbc10d6a145152fc2629043c46ef4a9ca71 (diff)
downloaddexon-085f604b27c8b3fbd82f2aa9d02a4251df0d5db5.tar
dexon-085f604b27c8b3fbd82f2aa9d02a4251df0d5db5.tar.gz
dexon-085f604b27c8b3fbd82f2aa9d02a4251df0d5db5.tar.bz2
dexon-085f604b27c8b3fbd82f2aa9d02a4251df0d5db5.tar.lz
dexon-085f604b27c8b3fbd82f2aa9d02a4251df0d5db5.tar.xz
dexon-085f604b27c8b3fbd82f2aa9d02a4251df0d5db5.tar.zst
dexon-085f604b27c8b3fbd82f2aa9d02a4251df0d5db5.zip
Show newly created private key during startup. Closes #126
-rw-r--r--cmd/mist/assets/qml/views/wallet.qml4
-rw-r--r--cmd/utils/cmd.go2
-rw-r--r--crypto/key_manager.go4
3 files changed, 7 insertions, 3 deletions
diff --git a/cmd/mist/assets/qml/views/wallet.qml b/cmd/mist/assets/qml/views/wallet.qml
index ad7a11047..9727ef35c 100644
--- a/cmd/mist/assets/qml/views/wallet.qml
+++ b/cmd/mist/assets/qml/views/wallet.qml
@@ -148,8 +148,8 @@ Rectangle {
id: txTableView
anchors.fill : parent
TableViewColumn{ role: "num" ; title: "#" ; width: 30 }
- TableViewColumn{ role: "from" ; title: "From" ; width: 280 }
- TableViewColumn{ role: "to" ; title: "To" ; width: 280 }
+ TableViewColumn{ role: "from" ; title: "From" ; width: 340 }
+ TableViewColumn{ role: "to" ; title: "To" ; width: 340 }
TableViewColumn{ role: "value" ; title: "Amount" ; width: 100 }
model: ListModel {
diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go
index d9b26c701..db7bcd35e 100644
--- a/cmd/utils/cmd.go
+++ b/cmd/utils/cmd.go
@@ -145,7 +145,6 @@ func NewDatabase() ethutil.Database {
}
func NewClientIdentity(clientIdentifier, version, customIdentifier string) *wire.SimpleClientIdentity {
- clilogger.Infoln("identity created")
return wire.NewSimpleClientIdentity(clientIdentifier, version, customIdentifier)
}
@@ -240,6 +239,7 @@ func KeyTasks(keyManager *crypto.KeyManager, KeyRing string, GenAddr bool, Secre
exit(err)
}
}
+ clilogger.Infof("Main address %x\n", keyManager.Address())
}
func StartRpc(ethereum *eth.Ethereum, RpcPort int) {
diff --git a/crypto/key_manager.go b/crypto/key_manager.go
index cc2b9ff90..326e559e0 100644
--- a/crypto/key_manager.go
+++ b/crypto/key_manager.go
@@ -5,8 +5,11 @@ import (
"sync"
"github.com/ethereum/go-ethereum/ethutil"
+ "github.com/ethereum/go-ethereum/logger"
)
+var keylogger = logger.NewLogger("KEY")
+
type KeyManager struct {
keyRing *KeyRing
session string
@@ -104,6 +107,7 @@ func (k *KeyManager) Init(session string, cursor int, force bool) error {
}
if keyRing == nil {
keyRing = NewGeneratedKeyRing(1)
+ keylogger.Infof("Created keypair. Private key: %x\n", keyRing.keys[0].PrivateKey)
}
return k.reset(session, cursor, keyRing)
}