Documentation ¶
Index ¶
- Variables
- type Block
- type DoneEvent
- type Downloader
- func (d *Downloader) DeliverBlocks(id string, blocks []*types.Block) error
- func (d *Downloader) DeliverHashes(id string, hashes []utils.Hash) error
- func (d *Downloader) Has(hash utils.Hash) bool
- func (d *Downloader) RegisterPeer(id string, version int, head utils.Hash, getRelHashes relativeHashFetcherFn, ...) error
- func (d *Downloader) Stats() (pending int, cached int, importing int, estimate time.Duration)
- func (d *Downloader) Synchronise(id string, head utils.Hash, td *big.Int) error
- func (d *Downloader) Synchronising() bool
- func (d *Downloader) Terminate()
- func (d *Downloader) UnregisterPeer(id string) error
- type FailedEvent
- type Fetcher
- type StartEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MinHashFetch = 512 MaxHashFetch = 512 MaxBlockFetch = 128 )
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶
func NewDownloader(mux *feed.TypeMux, hasBlock hashCheckFn, getBlock blockRetrievalFn, headBlock headRetrievalFn, gettd getTdFn, insertChain chainInsertFn, dropPeer peerDropFn) *Downloader
func (*Downloader) DeliverBlocks ¶
func (d *Downloader) DeliverBlocks(id string, blocks []*types.Block) error
func (*Downloader) DeliverHashes ¶
func (d *Downloader) DeliverHashes(id string, hashes []utils.Hash) error
func (*Downloader) RegisterPeer ¶
func (*Downloader) Synchronise ¶
func (*Downloader) Synchronising ¶
func (d *Downloader) Synchronising() bool
func (*Downloader) Terminate ¶
func (d *Downloader) Terminate()
func (*Downloader) UnregisterPeer ¶
func (d *Downloader) UnregisterPeer(id string) error
type FailedEvent ¶
type FailedEvent struct{ Err error }
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
func NewFetcher ¶
func NewFetcher(getBlock blockRetrievalFn, validateBlock blockValidatorFn, broadcastBlock blockBroadcasterFn, chainHeight chainHeightFn, insertChain chainInsertFn, dropPeer peerDropFn) *Fetcher
type StartEvent ¶
type StartEvent struct{}
Click to show internal directories.
Click to hide internal directories.