Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Rename HasBlock to NotifyNewBlocks, and make it accept multiple blocks #23

Merged
merged 3 commits into from
Jul 27, 2022

Conversation

MichaelMure
Copy link
Contributor

The goal here is twofold:

The goal here is twofold:
- allows for batched handling of multiple blocks at once
- act as a noisy signal for the breaking change that Bitswap is not adding blocks in the blockstore itself anymore (see ipfs/go-bitswap#571)
@MichaelMure
Copy link
Contributor Author

Also, unless I'm missing something, IsOnline() bool is never used? Should that be removed while this interface is being worked on?

interface.go Outdated
// available on the network?
HasBlock(context.Context, blocks.Block) error
// NotifyNewBlocks tells the exchange that new blocks are available and can be served.
NotifyNewBlocks(ctx context.Context, blocks ...blocks.Block) error

IsOnline() bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop this. It literally isn't used anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Signed-off-by: Jorropo <jorropo.pgm@gmail.com>
@Jorropo Jorropo merged commit 7a45bd7 into ipfs:master Jul 27, 2022
Jorropo pushed a commit to MichaelMure/go-ipfs-exchange-offline that referenced this pull request Jul 27, 2022
@MichaelMure MichaelMure deleted the notifynewblocks branch July 27, 2022 15:24
@ajnavarro ajnavarro mentioned this pull request Aug 24, 2022
72 tasks
Jorropo pushed a commit to ipfs/go-libipfs-rapide that referenced this pull request Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants