Documentation ¶
Overview ¶
Package fetcher contains the block announcement based synchonisation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶ added in v0.9.39
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher is responsible for accumulating block announcements from various peers and scheduling them for retrieval.
func New ¶ added in v0.9.39
func New(getBlock blockRetrievalFn, validateBlock blockValidatorFn, broadcastBlock blockBroadcasterFn, chainHeight chainHeightFn, insertChain chainInsertFn, dropPeer peerDropFn) *Fetcher
New creates a block fetcher to retrieve blocks based on hash announcements.
func (*Fetcher) Enqueue ¶ added in v0.9.39
Enqueue tries to fill gaps the the fetcher's future import queue.
func (*Fetcher) Filter ¶ added in v0.9.39
Filter extracts all the blocks that were explicitly requested by the fetcher, returning those that should be handled differently.
func (*Fetcher) Notify ¶ added in v0.9.39
func (f *Fetcher) Notify(peer string, hash common.Hash, time time.Time, fetcher blockRequesterFn) error
Notify announces the fetcher of the potential availability of a new block in the network.
Click to show internal directories.
Click to hide internal directories.