fix FromDatastore to not do double adapting

This commit is contained in:
vyzo 2021-03-02 18:21:17 +02:00
parent ab52e34e6a
commit 4c05ec28ba

View File

@ -54,7 +54,7 @@ func WrapIDStore(bstore blockstore.Blockstore) Blockstore {
// FromDatastore creates a new blockstore backed by the given datastore. // FromDatastore creates a new blockstore backed by the given datastore.
func FromDatastore(dstore ds.Batching) Blockstore { func FromDatastore(dstore ds.Batching) Blockstore {
return WrapIDStore(Adapt(blockstore.NewBlockstore(dstore))) return WrapIDStore(blockstore.NewBlockstore(dstore))
} }
type adaptedBlockstore struct { type adaptedBlockstore struct {