Skip to content

Commit

Permalink
Merge pull request #5329 from grokcoder/fix/dht_findprovs_error
Browse files Browse the repository at this point in the history
fix: dht findprovs unable to handle /ipfs/hash #5311
  • Loading branch information
whyrusleeping authored Aug 5, 2018
2 parents d0a1cee + 664d881 commit ba3f8fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/commands/dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ var findProvidersDhtCmd = &cmds.Command{

events := make(chan *notif.QueryEvent)
ctx := notif.RegisterForQueryEvents(req.Context(), events)
c, err := cid.Parse(req.Arguments()[0])

c, err := cid.Decode(req.Arguments()[0])
if err != nil {
res.SetError(err, cmdkit.ErrNormal)
return
Expand Down
4 changes: 4 additions & 0 deletions test/sharness/t0175-reprovider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,9 @@ findprovs_empty '$HASH_0'
reprovide
findprovs_expect '$HASH_0' '$PEERID_0'

test_expect_success 'resolve object $HASH_0' '
HASH_WITH_PREFIX=$(ipfsi 1 resolve $HASH_0)
'
findprovs_expect '$HASH_WITH_PREFIX' '$PEERID_0'

test_done

0 comments on commit ba3f8fc

Please sign in to comment.