Skip to content
This repository was 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
Jorropo merged 3 commits intoipfs:masterfrom
MichaelMure:notifynewblocks
Jul 27, 2022
Merged

Rename HasBlock to NotifyNewBlocks, and make it accept multiple blocks#23
Jorropo merged 3 commits intoipfs:masterfrom
MichaelMure:notifynewblocks

Conversation

@MichaelMure
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

Comment thread interface.go Outdated
// 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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@MichaelMure MichaelMure requested a review from Stebalien July 13, 2022 14:29
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