From 637fbf6c5b0805de95ab50a02e658a1ccd44351c Mon Sep 17 00:00:00 2001 From: vyzo Date: Fri, 2 Jul 2021 15:49:33 +0300 Subject: [PATCH] fix faulty if/else logic for implicit txn protection --- blockstore/splitstore/splitstore.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blockstore/splitstore/splitstore.go b/blockstore/splitstore/splitstore.go index 65eb73962..29ad3a94b 100644 --- a/blockstore/splitstore/splitstore.go +++ b/blockstore/splitstore/splitstore.go @@ -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) })