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

use peer.IDFromBytes instead of peer.IDFromString #38

Merged
merged 1 commit into from
Aug 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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