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
24a6d87c
Commit
24a6d87c
authored
May 26, 2014
by
Maran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't handshake if there is no key yet; first start on Ethereal
parent
4c7bd75c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
peer.go
peer.go
+8
-5
No files found.
peer.go
View file @
24a6d87c
...
@@ -531,13 +531,16 @@ func (p *Peer) Stop() {
...
@@ -531,13 +531,16 @@ func (p *Peer) Stop() {
}
}
func
(
p
*
Peer
)
pushHandshake
()
error
{
func
(
p
*
Peer
)
pushHandshake
()
error
{
pubkey
:=
ethutil
.
GetKeyRing
()
.
Get
(
0
)
.
PublicKey
keyRing
:=
ethutil
.
GetKeyRing
()
.
Get
(
0
)
if
keyRing
!=
nil
{
pubkey
:=
keyRing
.
PublicKey
msg
:=
ethwire
.
NewMessage
(
ethwire
.
MsgHandshakeTy
,
[]
interface
{}{
msg
:=
ethwire
.
NewMessage
(
ethwire
.
MsgHandshakeTy
,
[]
interface
{}{
uint32
(
ProtocolVersion
),
uint32
(
0
),
p
.
Version
,
byte
(
p
.
caps
),
p
.
port
,
pubkey
[
1
:
],
uint32
(
ProtocolVersion
),
uint32
(
0
),
p
.
Version
,
byte
(
p
.
caps
),
p
.
port
,
pubkey
[
1
:
],
})
})
p
.
QueueMessage
(
msg
)
p
.
QueueMessage
(
msg
)
}
return
nil
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