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 2 commits
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
7 changes: 2 additions & 5 deletions interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +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

IsOnline() bool
// NotifyNewBlocks tells the exchange that new blocks are available and can be served.
NotifyNewBlocks(ctx context.Context, blocks ...blocks.Block) error

io.Closer
}
Expand Down