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 }