Skip to content

Commit

Permalink
feat: stub and deprecate NewBlockstoreNoPrefix
Browse files Browse the repository at this point in the history
This commit was moved from ipfs/go-ipfs-blockstore@1323a47
  • Loading branch information
Jorropo committed Mar 8, 2023
1 parent 2cd3f88 commit eeceee5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions blockstore/blockstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,20 @@ func NewBlockstore(d ds.Batching, opts ...Option) Blockstore {
}

if !bs.noPrefix {
dd := dsns.Wrap(d, BlockPrefix)
bs.datastore = dd
bs.datastore = dsns.Wrap(bs.datastore, BlockPrefix)
}
return bs
}

// NewBlockstoreNoPrefix returns a default Blockstore implementation
// using the provided datastore.Batching backend.
// This constructor does not modify input keys in any way
//
// Deprecated: Use NewBlockstore with the NoPrefix option instead.
func NewBlockstoreNoPrefix(d ds.Batching) Blockstore {
return NewBlockstore(d, NoPrefix())
}

type blockstore struct {
datastore ds.Batching

Expand Down

0 comments on commit eeceee5

Please sign in to comment.