Show newly created private key during startup. Closes #126

This commit is contained in:
obscuren 2014-12-04 17:09:47 +01:00
parent a5b27bbc10
commit 085f604b27
3 changed files with 7 additions and 3 deletions

@ -148,8 +148,8 @@ Rectangle {
id: txTableView id: txTableView
anchors.fill : parent anchors.fill : parent
TableViewColumn{ role: "num" ; title: "#" ; width: 30 } TableViewColumn{ role: "num" ; title: "#" ; width: 30 }
TableViewColumn{ role: "from" ; title: "From" ; width: 280 } TableViewColumn{ role: "from" ; title: "From" ; width: 340 }
TableViewColumn{ role: "to" ; title: "To" ; width: 280 } TableViewColumn{ role: "to" ; title: "To" ; width: 340 }
TableViewColumn{ role: "value" ; title: "Amount" ; width: 100 } TableViewColumn{ role: "value" ; title: "Amount" ; width: 100 }
model: ListModel { model: ListModel {

@ -145,7 +145,6 @@ func NewDatabase() ethutil.Database {
} }
func NewClientIdentity(clientIdentifier, version, customIdentifier string) *wire.SimpleClientIdentity { func NewClientIdentity(clientIdentifier, version, customIdentifier string) *wire.SimpleClientIdentity {
clilogger.Infoln("identity created")
return wire.NewSimpleClientIdentity(clientIdentifier, version, customIdentifier) return wire.NewSimpleClientIdentity(clientIdentifier, version, customIdentifier)
} }
@ -240,6 +239,7 @@ func KeyTasks(keyManager *crypto.KeyManager, KeyRing string, GenAddr bool, Secre
exit(err) exit(err)
} }
} }
clilogger.Infof("Main address %x\n", keyManager.Address())
} }
func StartRpc(ethereum *eth.Ethereum, RpcPort int) { func StartRpc(ethereum *eth.Ethereum, RpcPort int) {

@ -5,8 +5,11 @@ import (
"sync" "sync"
"github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/logger"
) )
var keylogger = logger.NewLogger("KEY")
type KeyManager struct { type KeyManager struct {
keyRing *KeyRing keyRing *KeyRing
session string session string
@ -104,6 +107,7 @@ func (k *KeyManager) Init(session string, cursor int, force bool) error {
} }
if keyRing == nil { if keyRing == nil {
keyRing = NewGeneratedKeyRing(1) keyRing = NewGeneratedKeyRing(1)
keylogger.Infof("Created keypair. Private key: %x\n", keyRing.keys[0].PrivateKey)
} }
return k.reset(session, cursor, keyRing) return k.reset(session, cursor, keyRing)
} }