Skip to content

Commit

Permalink
refactor: Add peerstore to multistore (#1980)
Browse files Browse the repository at this point in the history
## Relevant issue(s)

Resolves #1680

## Description

This small refactor adds the `peerstore` to the `multistore`. In doing
so, we broaden the types of stores that can be part of the `multistore`
by starting from a `ds.Datastore` instead of the more restrictive
`DSReaderWriter`
  • Loading branch information
fredcarle authored Oct 18, 2023
1 parent 9cfd33f commit 2dbfbd6
Show file tree
Hide file tree
Showing 21 changed files with 212 additions and 315 deletions.
5 changes: 5 additions & 0 deletions client/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ type DB interface {
// It sits within the rootstore returned by [Root].
Blockstore() blockstore.Blockstore

// Peerstore returns the peerstore where known host information is stored.
//
// It sits within the rootstore returned by [Root].
Peerstore() datastore.DSBatching

// Close closes the database instance and releases any resources held.
//
// The behaviour of other functions in this package after this function has been called is undefined
Expand Down
41 changes: 41 additions & 0 deletions client/mocks/collection.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2dbfbd6

Please sign in to comment.