diff --git a/dhash/dhash_test.go b/dhash/dhash_test.go index 4448fac..4b894be 100644 --- a/dhash/dhash_test.go +++ b/dhash/dhash_test.go @@ -61,8 +61,7 @@ func TestCanDecryptEncryptedValue(t *testing.T) { func TestSecondMultihash(t *testing.T) { mh := test.RandomMultihashes(1)[0] - smh, err := SecondMultihash(mh) - require.NoError(t, err) + smh := SecondMultihash(mh) h := sha256.New() h.Write(append(secondHashPrefix, mh...)) diff --git a/find/client/dhash_client.go b/find/client/dhash_client.go index 16012da..acd1e1b 100644 --- a/find/client/dhash_client.go +++ b/find/client/dhash_client.go @@ -143,12 +143,7 @@ func (c *DHashClient) Find(ctx context.Context, mh multihash.Multihash) (*model. func (c *DHashClient) FindAsync(ctx context.Context, mh multihash.Multihash, resChan chan<- model.ProviderResult) error { defer close(resChan) - dhmh, err := dhash.SecondMultihash(mh) - if err != nil { - return err - } - - encryptedMultihashResults, err := c.dhstoreAPI.FindMultihash(ctx, dhmh) + encryptedMultihashResults, err := c.dhstoreAPI.FindMultihash(ctx, dhash.SecondMultihash(mh)) if err != nil { return err }