Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
use peer.IDFromBytes instead of peer.IDFromString (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann authored Aug 19, 2022
1 parent 500f0a8 commit 0d8e99b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions record.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (

pb "github.com/ipfs/go-ipns/pb"

proto "github.com/gogo/protobuf/proto"
"github.com/gogo/protobuf/proto"
logging "github.com/ipfs/go-log"
ic "github.com/libp2p/go-libp2p-core/crypto"
peer "github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/peer"
pstore "github.com/libp2p/go-libp2p-core/peerstore"
record "github.com/libp2p/go-libp2p-record"
)
Expand Down Expand Up @@ -46,7 +46,7 @@ func (v Validator) Validate(key string, value []byte) error {
}

// Get the public key defined by the ipns path
pid, err := peer.IDFromString(pidString)
pid, err := peer.IDFromBytes([]byte(pidString))
if err != nil {
log.Debugf("failed to parse ipns record key %s into peer ID", pidString)
return ErrKeyFormat
Expand Down

0 comments on commit 0d8e99b

Please sign in to comment.