From d4d10822f51274a686d67e89be67c7bae72a77cb Mon Sep 17 00:00:00 2001 From: Lukasz Zimnoch Date: Tue, 28 Sep 2021 12:28:47 +0200 Subject: [PATCH] Replace deprecated `Bytes` from `crypto.Key` The aforementioned method was deprecated and removed in `v0.9.0` of `go-libp2p-core`. The recommended replacement is using the `crypto.MarshalPublicKey` function. See: https://github.com/libp2p/go-libp2p-core/pull/204 --- pkg/net/libp2p/identity.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/net/libp2p/identity.go b/pkg/net/libp2p/identity.go index cdc326656e..9c29cc32bf 100644 --- a/pkg/net/libp2p/identity.go +++ b/pkg/net/libp2p/identity.go @@ -52,7 +52,7 @@ func (i *identity) Marshal() ([]byte, error) { } } - pubKeyBytes, err := pubKey.Bytes() + pubKeyBytes, err := libp2pcrypto.MarshalPublicKey(pubKey) if err != nil { return nil, err }