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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ import (
type Interface interface { // type Exchanger interface
Fetcher

// TODO Should callers be concerned with whether the block was made
// 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.


Expand Down