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
4f5b362b
Commit
4f5b362b
authored
Mar 20, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
%#x => %x
parent
91f9f355
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
main.go
cmd/ethereum/main.go
+1
-1
node.go
p2p/discover/node.go
+2
-2
message.go
p2p/message.go
+1
-1
No files found.
cmd/ethereum/main.go
View file @
4f5b362b
...
...
@@ -251,7 +251,7 @@ func accountList(ctx *cli.Context) {
utils
.
Fatalf
(
"Could not list accounts: %v"
,
err
)
}
for
_
,
acct
:=
range
accts
{
fmt
.
Printf
(
"Address: %
#
x
\n
"
,
acct
)
fmt
.
Printf
(
"Address: %x
\n
"
,
acct
)
}
}
...
...
p2p/discover/node.go
View file @
4f5b362b
...
...
@@ -143,12 +143,12 @@ type NodeID [nodeIDBits / 8]byte
// NodeID prints as a long hexadecimal number.
func
(
n
NodeID
)
String
()
string
{
return
fmt
.
Sprintf
(
"%
#
x"
,
n
[
:
])
return
fmt
.
Sprintf
(
"%x"
,
n
[
:
])
}
// The Go syntax representation of a NodeID is a call to HexID.
func
(
n
NodeID
)
GoString
()
string
{
return
fmt
.
Sprintf
(
"discover.HexID(
\"
%
#
x
\"
)"
,
n
[
:
])
return
fmt
.
Sprintf
(
"discover.HexID(
\"
%x
\"
)"
,
n
[
:
])
}
// HexID converts a hex string to a NodeID.
...
...
p2p/message.go
View file @
4f5b362b
...
...
@@ -40,7 +40,7 @@ func NewMsg(code uint64, params ...interface{}) Msg {
// For the decoding rules, please see package rlp.
func
(
msg
Msg
)
Decode
(
val
interface
{})
error
{
if
err
:=
rlp
.
Decode
(
msg
.
Payload
,
val
);
err
!=
nil
{
return
newPeerError
(
errInvalidMsg
,
"(code %
#
x) (size %d) %v"
,
msg
.
Code
,
msg
.
Size
,
err
)
return
newPeerError
(
errInvalidMsg
,
"(code %x) (size %d) %v"
,
msg
.
Code
,
msg
.
Size
,
err
)
}
return
nil
}
...
...
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