validator

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

View Source
const DO_NOT_MODIFY = "[do-not-modify]"

Variables

View Source
var (
	NewValidators                     = view.NewValidatorsView
	NewValidatorActivities            = view.NewValidatorActivitiesView
	NewValidatorActivitiesTotal       = view.NewValidatorActivitiesTotalView
	NewValidatorBlockCommitments      = view.NewValidatorBlockCommitments
	NewValidatorBlockCommitmentsTotal = view.NewValidatorBlockCommitmentsTotal
	UpdateLastHandledEventHeight      = (*Validator).UpdateLastHandledEventHeight
)

Functions

This section is empty.

Types

type AttentionStatusRules added in v1.6.5

type AttentionStatusRules struct {
	MaxCommissionRateChange MaxCommissionRateChange `mapstructure:"max_commission_rate_change"`
	MaxEditQuota            MaxEditQuota            `mapstructure:"max_edit_quota"`
}

type Config added in v1.6.5

type Config struct {
	AttentionStatusRules AttentionStatusRules `mapstructure:"attention_status_rules"`
}

func ConfigFromInterface added in v1.6.5

func ConfigFromInterface(data interface{}) (Config, error)

type MaxCommissionRateChange added in v1.6.5

type MaxCommissionRateChange struct {
	Enable    bool    `mapstructure:"enable"`
	MaxChange float64 `mapstructure:"max_change"`
}

type MaxEditQuota added in v1.6.5

type MaxEditQuota struct {
	Enable   bool           `mapstructure:"enable"`
	Quota    map[string]int `mapstructure:"quota"`
	Interval string         `mapstructure:"interval"`
	Duration int64
}

type Validator

type Validator struct {
	*rdbprojectionbase.Base
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator(
	logger applogger.Logger,
	rdbConn rdb.Conn,
	conNodeAddressPrefix string,
	migrationHelper migrationhelper.MigrationHelper,
	config *Config,
) *Validator

func (*Validator) GetEventsToListen

func (_ *Validator) GetEventsToListen() []string

func (*Validator) HandleEvents

func (projection *Validator) HandleEvents(height int64, events []event_entity.Event) error

func (*Validator) OnInit

func (projection *Validator) OnInit() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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