Documentation ¶
Index ¶
- func NewValidatorStatisticsProcessor(arguments ArgValidatorStatisticsProcessor) (*validatorStatistics, error)
- func NewValidatorsProvider(validatorStatisticsProcessor process.ValidatorStatisticsProcessor, ...) (*validatorsProvider, error)
- type ArgValidatorStatisticsProcessor
- type DataPool
- type ListIndexUpdater
- type RatingReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewValidatorStatisticsProcessor ¶
func NewValidatorStatisticsProcessor(arguments ArgValidatorStatisticsProcessor) (*validatorStatistics, error)
NewValidatorStatisticsProcessor instantiates a new validatorStatistics structure responsible of keeping account of
each validator actions in the consensus process
func NewValidatorsProvider ¶ added in v0.0.5
func NewValidatorsProvider( validatorStatisticsProcessor process.ValidatorStatisticsProcessor, maxRating uint32, pubkeyConverter state.PubkeyConverter, ) (*validatorsProvider, error)
NewValidatorsProvider instantiates a new validatorsProvider structure responsible of keeping account of
the latest information about the validators
Types ¶
type ArgValidatorStatisticsProcessor ¶
type ArgValidatorStatisticsProcessor struct { StakeValue *big.Int Marshalizer marshal.Marshalizer NodesCoordinator sharding.NodesCoordinator ShardCoordinator sharding.Coordinator DataPool DataPool StorageService dataRetriever.StorageService PubkeyConv state.PubkeyConverter PeerAdapter state.AccountsAdapter Rater sharding.PeerAccountListAndRatingHandler RewardsHandler process.RewardsHandler MaxComputableRounds uint64 StartEpoch uint32 NodesSetup sharding.GenesisNodesSetupHandler }
ArgValidatorStatisticsProcessor holds all dependencies for the validatorStatistics
type DataPool ¶
type DataPool interface { Headers() dataRetriever.HeadersPool IsInterfaceNil() bool }
DataPool indicates the main functionality needed in order to fetch the required blocks from the pool
type ListIndexUpdater ¶ added in v1.0.102
type ListIndexUpdater struct {
// contains filtered or unexported fields
}
ListIndexUpdater will handle the updating of list type and the index for a peer
func (*ListIndexUpdater) IsInterfaceNil ¶ added in v1.0.102
func (liu *ListIndexUpdater) IsInterfaceNil() bool
IsInterfaceNil checks if the underlying object is nil
func (*ListIndexUpdater) UpdateListAndIndex ¶ added in v1.0.102
func (liu *ListIndexUpdater) UpdateListAndIndex(pubKey string, shardID uint32, list string, index uint32) error
UpdateListAndIndex will update the list and the index for a given peer
type RatingReader ¶
type RatingReader struct {
// contains filtered or unexported fields
}
RatingReader will handle the fetching of the ratings
func (*RatingReader) GetRating ¶
func (bsr *RatingReader) GetRating(pk string) uint32
GetRating returns the Rating for the specified public key
func (*RatingReader) IsInterfaceNil ¶
func (bsr *RatingReader) IsInterfaceNil() bool
IsInterfaceNil checks if the underlying object is nil