Skip to content

Commit

Permalink
Revert "fix: ensure hasher is registered when using a hashing function"
Browse files Browse the repository at this point in the history
This has been superseeded by 7d0ea08.

This reverts commit 773c246.
  • Loading branch information
Jorropo committed Dec 5, 2022
1 parent 7d0ea08 commit 807b985
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,6 @@ See 'dag export' and 'dag import' for more information.
if !ok {
return fmt.Errorf("unrecognized hash function: %q", strings.ToLower(hashFunStr))
}
if _, err := mh.GetHasher(hashFunCode); err != nil {
return err
}

enc, err := cmdenv.GetCidEncoder(req)
if err != nil {
Expand Down
4 changes: 0 additions & 4 deletions test/sharness/t0042-add-skip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ EOF
test_cmp expected actual
'

test_expect_failure "'ipfs add' with an unregistered hash and wrapped leaves fails without crashing" '
ipfs add --hash poseidon-bls12_381-a2-fc1 --raw-leaves=false -r mountdir/planets
'

}

# should work offline
Expand Down

0 comments on commit 807b985

Please sign in to comment.