aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
authorJU HYEONG PARK <dkdkajej@gmail.com>2018-02-27 00:22:46 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-02-27 00:22:46 +0800
commit61c9730b2de2719059f0fb2ce8f965c0cde34527 (patch)
tree5bd5e0bcca28c4ceb9d0e487561a41a67508a1d7 /p2p
parentf83237573f0922dfc9fef17f79ccd06305ab6d16 (diff)
downloaddexon-61c9730b2de2719059f0fb2ce8f965c0cde34527.tar
dexon-61c9730b2de2719059f0fb2ce8f965c0cde34527.tar.gz
dexon-61c9730b2de2719059f0fb2ce8f965c0cde34527.tar.bz2
dexon-61c9730b2de2719059f0fb2ce8f965c0cde34527.tar.lz
dexon-61c9730b2de2719059f0fb2ce8f965c0cde34527.tar.xz
dexon-61c9730b2de2719059f0fb2ce8f965c0cde34527.tar.zst
dexon-61c9730b2de2719059f0fb2ce8f965c0cde34527.zip
p2p: fix doEncHandshake documentation (#16184)
Diffstat (limited to 'p2p')
-rw-r--r--p2p/rlpx.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/p2p/rlpx.go b/p2p/rlpx.go
index e65a0b604..1889edac9 100644
--- a/p2p/rlpx.go
+++ b/p2p/rlpx.go
@@ -121,10 +121,6 @@ func (t *rlpx) close(err error) {
t.fd.Close()
}
-// doEncHandshake runs the protocol handshake using authenticated
-// messages. the protocol handshake is the first authenticated message
-// and also verifies whether the encryption handshake 'worked' and the
-// remote side actually provided the right public key.
func (t *rlpx) doProtoHandshake(our *protoHandshake) (their *protoHandshake, err error) {
// Writing our handshake happens concurrently, we prefer
// returning the handshake read error. If the remote side
@@ -175,6 +171,10 @@ func readProtocolHandshake(rw MsgReader, our *protoHandshake) (*protoHandshake,
return &hs, nil
}
+// doEncHandshake runs the protocol handshake using authenticated
+// messages. the protocol handshake is the first authenticated message
+// and also verifies whether the encryption handshake 'worked' and the
+// remote side actually provided the right public key.
func (t *rlpx) doEncHandshake(prv *ecdsa.PrivateKey, dial *discover.Node) (discover.NodeID, error) {
var (
sec secrets