p2p: fix doEncHandshake documentation (#16184)

This commit is contained in:
JU HYEONG PARK 2018-02-27 01:22:46 +09:00 committed by Felix Lange
parent f83237573f
commit 61c9730b2d

View File

@ -121,10 +121,6 @@ func (t *rlpx) close(err error) {
t.fd.Close() 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) { func (t *rlpx) doProtoHandshake(our *protoHandshake) (their *protoHandshake, err error) {
// Writing our handshake happens concurrently, we prefer // Writing our handshake happens concurrently, we prefer
// returning the handshake read error. If the remote side // returning the handshake read error. If the remote side
@ -175,6 +171,10 @@ func readProtocolHandshake(rw MsgReader, our *protoHandshake) (*protoHandshake,
return &hs, nil 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) { func (t *rlpx) doEncHandshake(prv *ecdsa.PrivateKey, dial *discover.Node) (discover.NodeID, error) {
var ( var (
sec secrets sec secrets