simplify Has

This commit is contained in:
vyzo 2020-11-29 13:00:36 +02:00
parent 37e391f133
commit 0af7b16ad5

View File

@ -55,12 +55,8 @@ func (s *SplitStore) DeleteBlock(cid cid.Cid) error {
func (s *SplitStore) Has(cid cid.Cid) (bool, error) {
has, err := s.hot.Has(cid)
if err != nil {
return false, err
}
if has {
return true, nil
if err != nil || has {
return has, err
}
return s.cold.Has(cid)