Skip to content

Commit

Permalink
Fix error when no doublehash db exists
Browse files Browse the repository at this point in the history
This was introduced after the refactor here: db00015.

Before, we did not error when a double-hash db does not exist (meaning there are no entries in it). This goes back to that behaviour.
  • Loading branch information
hsanjuan committed Dec 17, 2024
1 parent 8af5198 commit 0dd1ed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion denylist.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ func toDNSLinkFQDN(label string) string {
func (dl *Denylist) checkDoubleHashWithFn(caller string, origKey string, code uint64) (Status, Entry, error) {
blocksdb, ok := dl.DoubleHashBlocksDB[code]
if !ok {
return StatusErrored, Entry{}, fmt.Errorf("no DoubleHashBlocksDB for code %d", code)
return StatusNotFound, Entry{}, nil
}
// Double-hash the key
doubleHash, err := multihash.Sum([]byte(origKey), code, -1)
Expand Down

0 comments on commit 0dd1ed4

Please sign in to comment.