From 4c05ec28ba45e6947118c5a0bc836f312442d0e9 Mon Sep 17 00:00:00 2001 From: vyzo Date: Tue, 2 Mar 2021 18:21:17 +0200 Subject: [PATCH] fix FromDatastore to not do double adapting --- blockstore/blockstore.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blockstore/blockstore.go b/blockstore/blockstore.go index 2624a7a9d..23f0bd754 100644 --- a/blockstore/blockstore.go +++ b/blockstore/blockstore.go @@ -47,14 +47,14 @@ func WrapIDStore(bstore blockstore.Blockstore) Blockstore { return NewIDStore(bs) } - // The underlying blockstore does not implement DeleteMany, so we need to shim it. - // This is less efficient as it'll iterate and perform single deletes. + // The underlying blockstore does not implement DeleteMany, so we need to shim it. + // This is less efficient as it'll iterate and perform single deletes. return NewIDStore(Adapt(bstore)) } // FromDatastore creates a new blockstore backed by the given datastore. func FromDatastore(dstore ds.Batching) Blockstore { - return WrapIDStore(Adapt(blockstore.NewBlockstore(dstore))) + return WrapIDStore(blockstore.NewBlockstore(dstore)) } type adaptedBlockstore struct {