Skip to content

Commit

Permalink
update test code
Browse files Browse the repository at this point in the history
  • Loading branch information
gammazero committed Mar 29, 2024
1 parent 79f7e8e commit 73ec32e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 1 addition & 2 deletions dhash/dhash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...))
Expand Down
7 changes: 1 addition & 6 deletions find/client/dhash_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 73ec32e

Please sign in to comment.