track

package
v1.0.108 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilBlockTrackerHandler = errors.New("nil block tracker handler")

ErrNilBlockTrackerHandler signals that a nil block tracker handler has been provided

View Source
var ErrNilCrossNotarizedHeadersNotifier = errors.New("nil cross notarized header notifier")

ErrNilCrossNotarizedHeadersNotifier signals that a nil block notifier handler has been provided

View Source
var ErrNilCrossNotarizer = errors.New("nil cross notarizer")

ErrNilCrossNotarizer signals that a nil block notarizer handler has been provided

View Source
var ErrNilRounder = errors.New("nil rounder")

ErrNilRounder signals that a nil rounder has been provided

View Source
var ErrNilSelfNotarizedHeadersNotifier = errors.New("nil self notarized header notifier")

ErrNilSelfNotarizedHeadersNotifier signals that a nil block notifier handler has been provided

View Source
var ErrNotarizedHeaderOffsetIsOutOfBound = errors.New("requested offset of the notarized header is out of bound")

ErrNotarizedHeaderOffsetIsOutOfBound signals that a requested offset of the notarized header is out of bound

Functions

func NewBlockBalancer

func NewBlockBalancer() (*blockBalancer, error)

NewBlockBalancer creates a block balancer object which implements blockBalancerHandler interface

func NewBlockNotarizer

func NewBlockNotarizer(
	hasher hashing.Hasher,
	marshalizer marshal.Marshalizer,
	shardCoordinator sharding.Coordinator,
) (*blockNotarizer, error)

NewBlockNotarizer creates a block notarizer object which implements blockNotarizerHandler interface

func NewBlockNotifier

func NewBlockNotifier() (*blockNotifier, error)

NewBlockNotifier creates a block notifier object which implements blockNotifierHandler interface

func NewBlockProcessor

func NewBlockProcessor(arguments ArgBlockProcessor) (*blockProcessor, error)

NewBlockProcessor creates a block processor object which implements blockProcessorHandler interface

func NewMetaBlockTrack

func NewMetaBlockTrack(arguments ArgMetaTracker) (*metaBlockTrack, error)

NewMetaBlockTrack creates an object for tracking the received meta blocks

func NewShardBlockTrack

func NewShardBlockTrack(arguments ArgShardTracker) (*shardBlockTrack, error)

NewShardBlockTrack creates an object for tracking the received shard blocks

Types

type ArgBaseTracker

type ArgBaseTracker struct {
	Hasher           hashing.Hasher
	HeaderValidator  process.HeaderConstructionValidator
	Marshalizer      marshal.Marshalizer
	RequestHandler   process.RequestHandler
	Rounder          process.Rounder
	ShardCoordinator sharding.Coordinator
	Store            dataRetriever.StorageService
	StartHeaders     map[uint32]data.HeaderHandler
	PoolsHolder      dataRetriever.PoolsHolder
	WhitelistHandler process.WhiteListHandler
}

ArgBaseTracker holds all dependencies required by the process data factory in order to create new instances of shard/meta block tracker

type ArgBlockProcessor

type ArgBlockProcessor struct {
	HeaderValidator               process.HeaderConstructionValidator
	RequestHandler                process.RequestHandler
	ShardCoordinator              sharding.Coordinator
	BlockTracker                  blockTrackerHandler
	CrossNotarizer                blockNotarizerHandler
	CrossNotarizedHeadersNotifier blockNotifierHandler
	SelfNotarizedHeadersNotifier  blockNotifierHandler
	Rounder                       process.Rounder
}

ArgBlockProcessor holds all dependencies required to process tracked blocks in order to create new instances of block processor

type ArgMetaTracker

type ArgMetaTracker struct {
	ArgBaseTracker
}

ArgMetaTracker holds all dependencies required by the process data factory in order to create new instances of meta block tracker

type ArgShardTracker

type ArgShardTracker struct {
	ArgBaseTracker
}

ArgShardTracker holds all dependencies required by the process data factory in order to create new instances of shard block tracker

type HeaderInfo

type HeaderInfo struct {
	Hash   []byte
	Header data.HeaderHandler
}

HeaderInfo holds the information about a header

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL