From 0b84e3224f07ffc4b8bda17a42ebee37cc76964d Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 19 Feb 2016 00:34:35 +0100 Subject: [PATCH] p2p: fix RLPx nits --- p2p/rlpx.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/p2p/rlpx.go b/p2p/rlpx.go index 469390c0c9..a0b064cabd 100644 --- a/p2p/rlpx.go +++ b/p2p/rlpx.go @@ -256,7 +256,7 @@ func (h *encHandshake) secrets(auth, authResp []byte) (secrets, error) { return s, nil } -// ecdhShared returns the static shared secret, the result +// staticSharedSecret returns the static shared secret, the result // of key agreement between the local and remote static node key. func (h *encHandshake) staticSharedSecret(prv *ecdsa.PrivateKey) ([]byte, error) { return ecies.ImportECDSA(prv).GenerateShared(h.remotePub, sskLen, sskLen) @@ -490,7 +490,7 @@ func readHandshakeMsg(msg plainDecoder, plainSize int, prv *ecdsa.PrivateKey, r prefix := buf[:2] size := binary.BigEndian.Uint16(prefix) if size < uint16(plainSize) { - return buf, fmt.Errorf("size underflow, need at least ~d bytes", plainSize) + return buf, fmt.Errorf("size underflow, need at least %d bytes", plainSize) } buf = append(buf, make([]byte, size-uint16(plainSize)+2)...) if _, err := io.ReadFull(r, buf[plainSize:]); err != nil {