aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
Diffstat (limited to 'p2p')
-rw-r--r--p2p/rlpx.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/p2p/rlpx.go b/p2p/rlpx.go
index 2a9bdc121..c6fd841f7 100644
--- a/p2p/rlpx.go
+++ b/p2p/rlpx.go
@@ -429,7 +429,7 @@ func (msg *authMsgV4) decodePlain(input []byte) {
n := copy(msg.Signature[:], input)
n += shaLen // skip sha3(initiator-ephemeral-pubk)
n += copy(msg.InitiatorPubkey[:], input[n:])
- n += copy(msg.Nonce[:], input[n:])
+ copy(msg.Nonce[:], input[n:])
msg.Version = 4
msg.gotPlain = true
}
@@ -437,13 +437,13 @@ func (msg *authMsgV4) decodePlain(input []byte) {
func (msg *authRespV4) sealPlain(hs *encHandshake) ([]byte, error) {
buf := make([]byte, authRespLen)
n := copy(buf, msg.RandomPubkey[:])
- n += copy(buf[n:], msg.Nonce[:])
+ copy(buf[n:], msg.Nonce[:])
return ecies.Encrypt(rand.Reader, hs.remotePub, buf, nil, nil)
}
func (msg *authRespV4) decodePlain(input []byte) {
n := copy(msg.RandomPubkey[:], input)
- n += copy(msg.Nonce[:], input[n:])
+ copy(msg.Nonce[:], input[n:])
msg.Version = 4
}