Skip to content

Commit 61c9730

Browse files
4000Dfjl
authored andcommitted
p2p: fix doEncHandshake documentation (#16184)
1 parent f832375 commit 61c9730

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

p2p/rlpx.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ func (t *rlpx) close(err error) {
121121
t.fd.Close()
122122
}
123123

124-
// doEncHandshake runs the protocol handshake using authenticated
125-
// messages. the protocol handshake is the first authenticated message
126-
// and also verifies whether the encryption handshake 'worked' and the
127-
// remote side actually provided the right public key.
128124
func (t *rlpx) doProtoHandshake(our *protoHandshake) (their *protoHandshake, err error) {
129125
// Writing our handshake happens concurrently, we prefer
130126
// returning the handshake read error. If the remote side
@@ -175,6 +171,10 @@ func readProtocolHandshake(rw MsgReader, our *protoHandshake) (*protoHandshake,
175171
return &hs, nil
176172
}
177173

174+
// doEncHandshake runs the protocol handshake using authenticated
175+
// messages. the protocol handshake is the first authenticated message
176+
// and also verifies whether the encryption handshake 'worked' and the
177+
// remote side actually provided the right public key.
178178
func (t *rlpx) doEncHandshake(prv *ecdsa.PrivateKey, dial *discover.Node) (discover.NodeID, error) {
179179
var (
180180
sec secrets

0 commit comments

Comments
 (0)