p2p/discover: fix lint

This commit is contained in:
Felix Lange 2020-03-08 15:25:30 +01:00
parent 2c4e012660
commit cdea5108db
4 changed files with 6 additions and 6 deletions

View file

@ -18,11 +18,11 @@ package discover
import (
"crypto/ecdsa"
"crypto/elliptic"
"errors"
"math/big"
"net"
"time"
"crypto/elliptic"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/crypto"

View file

@ -384,9 +384,9 @@ func (c *wireCodec) deriveKeys(n1, n2 enode.ID, priv *ecdsa.PrivateKey, pub *ecd
info = append(info, n2[:]...)
kdf := hkdf.New(c.sha256reset, eph, challenge.IDNonce[:], info)
sec := handshakeSecrets{
writeKey: make([]byte, 16),
readKey: make([]byte, 16),
authRespKey: make([]byte, 16),
writeKey: make([]byte, aesKeySize),
readKey: make([]byte, aesKeySize),
authRespKey: make([]byte, aesKeySize),
}
kdf.Read(sec.writeKey)
kdf.Read(sec.readKey)

View file

@ -91,7 +91,7 @@ func TestHandshakeV5(t *testing.T) {
net.nodeA.expectDecode(t, p_nodesV5, nodes)
}
// This test checks that handshake attempts are removed withing the timeout.
// This test checks that handshake attempts are removed within the timeout.
func TestHandshakeV5_timeout(t *testing.T) {
t.Parallel()
net := newHandshakeTest()

View file

@ -585,7 +585,7 @@ func (t *UDPv5) handlePacket(rawpacket []byte, fromAddr *net.UDPAddr) error {
return err
}
if fromNode != nil {
// Handshake suceeded, add to table.
// Handshake succeeded, add to table.
t.tab.addSeenNode(wrapNode(fromNode))
}
if packet.kind() != p_whoareyouV5 {