Skip to content

Commit 27a4b69

Browse files
committed
blockservice: move to single unique struct and add WithContentBlocker option
The idea is to have a THE blockservice object, this means we wont ever have an issue where multiple competitive features play poorly with each other due to how nested blockservices could do. Let's say we add multi-exchange based on content routing, do we want to have to handle the mess this could create with nested blockservices ? It implements features for ipfs-shipyard/nopfs#34.
1 parent 0536783 commit 27a4b69

File tree

8 files changed

+182
-103
lines changed

8 files changed

+182
-103
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The following emojis are used to highlight certain changes:
1818

1919
- `blockservice` now has `ContextWithSession` and `EmbedSessionInContext` functions, which allows to embed a session in a context. Future calls to `BlockGetter.GetBlock`, `BlockGetter.GetBlocks` and `NewSession` will use the session in the context.
2020
- `blockservice.NewWritethrough` deprecated function has been removed, instead you can do `blockservice.New(..., ..., WriteThrough())` like previously.
21+
- `blockservice` now has `WithContentBlocker` option which allows to filter Add and Get requests by CID.
2122

2223
### Changed
2324

0 commit comments

Comments
 (0)