Skip to content

Commit

Permalink
fix: move away from deprecated peer ID functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien authored and Walter Beegle committed Jun 8, 2020
1 parent e1de07f commit 9547a55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/commands/dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var queryDhtCmd = &cmds.Command{
return ErrNotDHT
}

id, err := peer.IDB58Decode(req.Arguments[0])
id, err := peer.Decode(req.Arguments[0])
if err != nil {
return cmds.ClientError("invalid peer ID")
}
Expand Down Expand Up @@ -370,7 +370,7 @@ var findPeerDhtCmd = &cmds.Command{
return ErrNotOnline
}

pid, err := peer.IDB58Decode(req.Arguments[0])
pid, err := peer.Decode(req.Arguments[0])
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion core/node/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func Identity(cfg *config.Config) fx.Option {
return fx.Error(errors.New("no peer ID in config! (was 'ipfs init' run?)"))
}

id, err := peer.IDB58Decode(cid)
id, err := peer.Decode(cid)
if err != nil {
return fx.Error(fmt.Errorf("peer ID invalid: %s", err))
}
Expand Down

0 comments on commit 9547a55

Please sign in to comment.