mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
p2p/discover: fix lint
This commit is contained in:
parent
2c4e012660
commit
cdea5108db
4 changed files with 6 additions and 6 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue