account for missing refs in the markset in Has

This commit is contained in:
vyzo 2022-01-31 09:44:37 +02:00
parent a9d4495d83
commit 1900c907fd

View File

@ -238,8 +238,12 @@ func (s *SplitStore) Has(ctx context.Context, cid cid.Cid) (bool, error) {
// critical section
if s.txnMarkSet != nil {
has, err := s.txnMarkSet.Has(cid)
if has || err != nil {
return has, err
if err != nil {
return false, err
}
if has {
return s.has(cid)
}
return s.cold.Has(ctx, cid)