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
3a2da31c
Commit
3a2da31c
authored
Apr 04, 2016
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2412 from fjl/p2p-eip8-enable
p2p: enable EIP-8 handshake sending
parents
52dc7cb4
659c0cb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
rlpx.go
p2p/rlpx.go
+1
-9
No files found.
p2p/rlpx.go
View file @
3a2da31c
...
...
@@ -31,7 +31,6 @@ import (
"io"
mrand
"math/rand"
"net"
"os"
"sync"
"time"
...
...
@@ -262,8 +261,6 @@ func (h *encHandshake) staticSharedSecret(prv *ecdsa.PrivateKey) ([]byte, error)
return
ecies
.
ImportECDSA
(
prv
)
.
GenerateShared
(
h
.
remotePub
,
sskLen
,
sskLen
)
}
var
configSendEIP
=
os
.
Getenv
(
"RLPX_EIP8"
)
!=
""
// initiatorEncHandshake negotiates a session token on conn.
// it should be called on the dialing side of the connection.
//
...
...
@@ -274,12 +271,7 @@ func initiatorEncHandshake(conn io.ReadWriter, prv *ecdsa.PrivateKey, remoteID d
if
err
!=
nil
{
return
s
,
err
}
var
authPacket
[]
byte
if
configSendEIP
{
authPacket
,
err
=
sealEIP8
(
authMsg
,
h
)
}
else
{
authPacket
,
err
=
authMsg
.
sealPlain
(
h
)
}
authPacket
,
err
:=
sealEIP8
(
authMsg
,
h
)
if
err
!=
nil
{
return
s
,
err
}
...
...
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