Skip to content

Commit

Permalink
Replace deprecated Bytes from crypto.Key
Browse files Browse the repository at this point in the history
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:
libp2p/go-libp2p-core#204
  • Loading branch information
lukasz-zimnoch committed Sep 28, 2021
1 parent b02f7ff commit d4d1082
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/net/libp2p/identity.go
Expand Up @@ -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
}
Expand Down

0 comments on commit d4d1082

Please sign in to comment.