votestatus

package
v0.0.0-...-2adbdf0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: CC0-1.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSkipRateReference

func GetSkipRateReference(end int, produced map[int]bool, schedule []int) (int, int)

GetSkipRateReference returns the total and skip amount in a epoch of the validator from the given produced map and the validator schedule

func UpdateValidatorSkipRates

func UpdateValidatorSkipRates(lastEpoch uint64, db db.VoteStatusDb, client ClientProxy) error

UpdateValidatorSkipRates properly stores the skip rates of all validators inside the database

func UpdateValidatorsStatus

func UpdateValidatorsStatus(db db.VoteStatusDb, client ClientProxy) error

UpdateValidatorsStatus insert current validators status

Types

type ClientProxy

type ClientProxy interface {
	GetVoteAccountsWithSlot() (uint64, clienttypes.VoteAccounts, error)
	GetLeaderSchedule(uint64) (clienttypes.LeaderSchedule, error)
}

type Module

type Module struct {
	// contains filtered or unexported fields
}

func NewModule

func NewModule(db db.VoteStatusDb, client ClientProxy) *Module

func (*Module) ExecEpoch

func (m *Module) ExecEpoch(epoch uint64) error

func (*Module) Name

func (m *Module) Name() string

Name implements modules.Module

func (*Module) RegisterPeriodicOperations

func (m *Module) RegisterPeriodicOperations(scheduler *gocron.Scheduler) error

RegisterPeriodicOperations implements modules.Module

func (*Module) RunPeriodicOperations

func (m *Module) RunPeriodicOperations() error

Jump to

Keyboard shortcuts

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