fix faulty if/else logic for implicit txn protection

This commit is contained in:
vyzo 2021-07-02 15:49:33 +03:00
parent 9d6bcd7705
commit 637fbf6c5b

View File

@ -661,9 +661,9 @@ func (s *SplitStore) trackTxnRef(c cid.Cid, implicit bool) {
return
}
if c.Prefix().Codec != cid.DagCBOR {
if c.Prefix().Codec != cid.DagCBOR || !implicit {
err = s.txnProtect.Mark(c)
} else if implicit {
} else {
err = s.walkLinks(c, cid.NewSet(), func(c cid.Cid) error {
return s.txnProtect.Mark(c)
})