aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-02 02:10:38 +0800
committerobscuren <geffobscura@gmail.com>2014-07-02 02:10:38 +0800
commit283532137713d20ca82d264bd105cf7cb0e47b65 (patch)
treeb3748c6af162b3b86076badb6176182227192cb4
parent74ef489fe276229858d4e69ca941eeb23f9e6f22 (diff)
downloaddexon-283532137713d20ca82d264bd105cf7cb0e47b65.tar.gz
dexon-283532137713d20ca82d264bd105cf7cb0e47b65.tar.zst
dexon-283532137713d20ca82d264bd105cf7cb0e47b65.zip
Fixed namereg
-rw-r--r--ethereal/assets/qml/wallet.qml2
-rw-r--r--ethereal/ui/gui.go16
-rw-r--r--utils/cmd.go3
3 files changed, 12 insertions, 9 deletions
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml
index 84f8fd5cf..628d9f96a 100644
--- a/ethereal/assets/qml/wallet.qml
+++ b/ethereal/assets/qml/wallet.qml
@@ -633,7 +633,7 @@ ApplicationWindow {
anchors.left: aboutIcon.right
anchors.leftMargin: 10
font.pointSize: 12
- text: "<h2>Ethereal</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Maran Hidskes<br>"
+ text: "<h2>Ethereal</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Maran Hidskes<br>Viktor TrĂ³n<br>"
}
}
diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go
index e3d3dc2f1..91351aced 100644
--- a/ethereal/ui/gui.go
+++ b/ethereal/ui/gui.go
@@ -211,13 +211,12 @@ type address struct {
Name, Address string
}
-var namereg = ethutil.Hex2Bytes("bb5f186604d057c1c5240ca2ae0f6430138ac010")
-
func (gui *Gui) loadAddressBook() {
gui.win.Root().Call("clearAddress")
- stateObject := gui.eth.StateManager().CurrentState().GetStateObject(namereg)
- if stateObject != nil {
- stateObject.State().EachStorage(func(name string, value *ethutil.Value) {
+
+ nameReg := ethpub.EthereumConfig(gui.eth.StateManager()).NameReg()
+ if nameReg != nil {
+ nameReg.State().EachStorage(func(name string, value *ethutil.Value) {
gui.win.Root().Call("addAddress", struct{ Name, Address string }{name, ethutil.Bytes2Hex(value.Bytes())})
})
}
@@ -274,7 +273,7 @@ func (gui *Gui) update() {
reactor.Subscribe("newBlock", blockChan)
reactor.Subscribe("newTx:pre", txChan)
reactor.Subscribe("newTx:post", txChan)
- reactor.Subscribe("object:"+string(namereg), objectChan)
+ //reactor.Subscribe("object:"+string(namereg), objectChan)
reactor.Subscribe("peerList", peerChan)
ticker := time.NewTicker(5 * time.Second)
@@ -352,8 +351,9 @@ func (gui *Gui) address() []byte {
}
func (gui *Gui) RegisterName(name string) {
- name = fmt.Sprintf("\"%s\"\n1", name)
- gui.pub.Transact(gui.privateKey(), "namereg", "1000", "1000000", "150", name)
+ name = fmt.Sprintf("\"%s\"", name)
+
+ gui.pub.Transact(gui.privateKey(), "NameReg", "", "10000", "10000000000000", name)
}
func (gui *Gui) Transact(recipient, value, gas, gasPrice, data string) (*ethpub.PReceipt, error) {
diff --git a/utils/cmd.go b/utils/cmd.go
index 7b2ac0e40..e10addf6c 100644
--- a/utils/cmd.go
+++ b/utils/cmd.go
@@ -106,6 +106,7 @@ func InitConfig(ConfigFile string, Datadir string, Identifier string, EnvPrefix
func exit(err error) {
status := 0
if err != nil {
+ fmt.Println(err)
logger.Errorln("Fatal: ", err)
status = 1
}
@@ -167,6 +168,8 @@ func KeyTasks(keyManager *ethcrypto.KeyManager, KeyRing string, GenAddr bool, Se
}
exit(err)
case len(SecretFile) > 0:
+ SecretFile = ethutil.ExpandHomePath(SecretFile)
+
if NonInteractive || confirm("This action overwrites your old private key.") {
err = keyManager.InitFromSecretsFile(KeyRing, 0, SecretFile)
}