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
7d815571
Commit
7d815571
authored
Dec 23, 2015
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
p2p: EIP-8 changes
parent
ee1debda
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
443 additions
and
149 deletions
+443
-149
message_test.go
p2p/message_test.go
+2
-1
peer.go
p2p/peer.go
+3
-0
rlpx.go
p2p/rlpx.go
+209
-142
rlpx_test.go
p2p/rlpx_test.go
+229
-6
No files found.
p2p/message_test.go
View file @
7d815571
...
@@ -143,7 +143,8 @@ func TestEOFSignal(t *testing.T) {
...
@@ -143,7 +143,8 @@ func TestEOFSignal(t *testing.T) {
}
}
func
unhex
(
str
string
)
[]
byte
{
func
unhex
(
str
string
)
[]
byte
{
b
,
err
:=
hex
.
DecodeString
(
strings
.
Replace
(
str
,
"
\n
"
,
""
,
-
1
))
r
:=
strings
.
NewReplacer
(
"
\t
"
,
""
,
" "
,
""
,
"
\n
"
,
""
)
b
,
err
:=
hex
.
DecodeString
(
r
.
Replace
(
str
))
if
err
!=
nil
{
if
err
!=
nil
{
panic
(
fmt
.
Sprintf
(
"invalid hex string: %q"
,
str
))
panic
(
fmt
.
Sprintf
(
"invalid hex string: %q"
,
str
))
}
}
...
...
p2p/peer.go
View file @
7d815571
...
@@ -56,6 +56,9 @@ type protoHandshake struct {
...
@@ -56,6 +56,9 @@ type protoHandshake struct {
Caps
[]
Cap
Caps
[]
Cap
ListenPort
uint64
ListenPort
uint64
ID
discover
.
NodeID
ID
discover
.
NodeID
// Ignore additional fields (for forward compatibility).
Rest
[]
rlp
.
RawValue
`rlp:"tail"`
}
}
// Peer represents a connected remote node.
// Peer represents a connected remote node.
...
...
p2p/rlpx.go
View file @
7d815571
This diff is collapsed.
Click to expand it.
p2p/rlpx_test.go
View file @
7d815571
This diff is collapsed.
Click to expand it.
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