Update rlpx.go

remove useless parameter
This commit is contained in:
ANOTHEL 2019-04-04 11:59:38 +09:00 committed by GitHub
parent 98e0bedcd7
commit 2a7e5ddc18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,7 +128,7 @@ func (t *rlpx) doProtoHandshake(our *protoHandshake) (their *protoHandshake, err
// as the error so it can be tracked elsewhere.
werr := make(chan error, 1)
go func() { werr <- Send(t.rw, handshakeMsg, our) }()
if their, err = readProtocolHandshake(t.rw, our); err != nil {
if their, err = readProtocolHandshake(t.rw); err != nil {
<-werr // make sure the write terminates too
return nil, err
}
@ -141,7 +141,7 @@ func (t *rlpx) doProtoHandshake(our *protoHandshake) (their *protoHandshake, err
return their, nil
}
func readProtocolHandshake(rw MsgReader, our *protoHandshake) (*protoHandshake, error) {
func readProtocolHandshake(rw MsgReader) (*protoHandshake, error) {
msg, err := rw.ReadMsg()
if err != nil {
return nil, err