From 9547a55af690ba0cda637c0d22cf59c0b82595b8 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sat, 14 Dec 2019 19:48:31 +0100 Subject: [PATCH] fix: move away from deprecated peer ID functions --- core/commands/dht.go | 4 ++-- core/node/groups.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/commands/dht.go b/core/commands/dht.go index a0b6380fd0a..3b1d2b15b27 100644 --- a/core/commands/dht.go +++ b/core/commands/dht.go @@ -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") } @@ -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 } diff --git a/core/node/groups.go b/core/node/groups.go index b567f34fac8..b2dbce27d58 100644 --- a/core/node/groups.go +++ b/core/node/groups.go @@ -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)) }