aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-04-04 18:10:48 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-04-04 18:10:48 +0800
commit3a2da31c3e20c0566068fe01125ab1c676d04392 (patch)
tree60b0ec7686b280e9b5130d33ace6f95266b581d5
parent52dc7cb452b5d717f825c259cd1b2dae9d5d70d8 (diff)
parent659c0cb9e878dc5e2af51e163c911337206885e5 (diff)
downloadgo-tangerine-3a2da31c3e20c0566068fe01125ab1c676d04392.tar.gz
go-tangerine-3a2da31c3e20c0566068fe01125ab1c676d04392.tar.zst
go-tangerine-3a2da31c3e20c0566068fe01125ab1c676d04392.zip
Merge pull request #2412 from fjl/p2p-eip8-enable
p2p: enable EIP-8 handshake sending
-rw-r--r--p2p/rlpx.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/p2p/rlpx.go b/p2p/rlpx.go
index ddfafe9a4..2a9bdc121 100644
--- a/p2p/rlpx.go
+++ b/p2p/rlpx.go
@@ -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
}