From 98a7b884fee37e395711361439ea15d02b5217fa Mon Sep 17 00:00:00 2001 From: vyzo Date: Wed, 3 Mar 2021 12:26:10 +0200 Subject: [PATCH] implement DeleteMany in union blockstore --- blockstore/union.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/blockstore/union.go b/blockstore/union.go index dfe5ea70c..a99ba2591 100644 --- a/blockstore/union.go +++ b/blockstore/union.go @@ -82,6 +82,15 @@ func (m unionBlockstore) DeleteBlock(cid cid.Cid) (err error) { return err } +func (m unionBlockstore) DeleteMany(cids []cid.Cid) (err error) { + for _, bs := range m { + if err = bs.DeleteMany(cids); err != nil { + break + } + } + return err +} + func (m unionBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) { // this does not deduplicate; this interface needs to be revisited. outCh := make(chan cid.Cid)