Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
28353213
Commit
28353213
authored
Jul 01, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed namereg
parent
74ef489f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
wallet.qml
ethereal/assets/qml/wallet.qml
+1
-1
gui.go
ethereal/ui/gui.go
+8
-8
cmd.go
utils/cmd.go
+3
-0
No files found.
ethereal/assets/qml/wallet.qml
View file @
28353213
...
...
@@ -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>
"
}
}
...
...
ethereal/ui/gui.go
View file @
28353213
...
...
@@ -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
\"\n
1"
,
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
)
{
...
...
utils/cmd.go
View file @
28353213
...
...
@@ -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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment