Documentation ¶
Index ¶
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
Types ¶
type ArgValidatorStatisticsProcessor ¶
type ArgValidatorStatisticsProcessor struct { StakeValue *big.Int Marshalizer marshal.Marshalizer NodesCoordinator sharding.NodesCoordinator ShardCoordinator sharding.Coordinator DataPool DataPool StorageService dataRetriever.StorageService AdrConv state.AddressConverter PeerAdapter state.AccountsAdapter Rater sharding.RaterHandler RewardsHandler process.RewardsHandler MaxComputableRounds uint64 StartEpoch uint32 }
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 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
func (*RatingReader) UpdateRatingFromTempRating ¶
func (bsr *RatingReader) UpdateRatingFromTempRating(pks []string) error
UpdateRatingFromTempRating returns the TempRating for the specified public key
Click to show internal directories.
Click to hide internal directories.