Documentation ¶
Overview ¶
Package les implements the Light Palletone Subprotocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LightFetcher ¶
type LightFetcher struct {
// contains filtered or unexported fields
}
Fetcher is responsible for accumulating block announcements from various peers and scheduling them for retrieval.
func New ¶
func New(getHeaderByHash headerRetrievalFn, lightChainHeight lightChainHeightFn, verifyHeader headerVerifierFn, broadcastHeader headerBroadcasterFn, insertHeader headerInsertFn, dropPeer peerDropFn) *LightFetcher
New creates a block fetcher to retrieve blocks based on hash announcements.
func (*LightFetcher) Enqueue ¶
func (f *LightFetcher) Enqueue(peer string, header *modules.Header) error
Enqueue tries to fill gaps the the fetcher's future import queue.
func (*LightFetcher) Start ¶
func (f *LightFetcher) Start()
Start boots up the announcement based synchroniser, accepting and processing hash notifications and block fetches until termination requested.
func (*LightFetcher) Stop ¶
func (f *LightFetcher) Stop()
Stop terminates the announcement based synchroniser, canceling all pending operations.
Click to show internal directories.
Click to hide internal directories.