From f4e6f2308d2f55313661bc93332f5cb9d42a60f1 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 22 Jul 2021 15:30:42 -0700 Subject: [PATCH] fix: remove deprecated call to pk.Bytes --- handshake.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handshake.go b/handshake.go index c94f38b..f872af9 100644 --- a/handshake.go +++ b/handshake.go @@ -199,7 +199,7 @@ func (s *secureSession) readHandshakeMessage(hs *noise.HandshakeState) ([]byte, func (s *secureSession) generateHandshakePayload(localStatic noise.DHKey) ([]byte, error) { // obtain the public key from the handshake session so we can sign it with // our libp2p secret key. - localKeyRaw, err := s.LocalPublicKey().Bytes() + localKeyRaw, err := crypto.MarshalPublicKey(s.LocalPublicKey()) if err != nil { return nil, fmt.Errorf("error serializing libp2p identity key: %w", err) }