validator

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ValidatorMapperName = "_base_validator_"
)

Variables

View Source
var (
	//EnableValidatorUpdatedKey 是否启用更新validator特性,默认关闭
	EnableValidatorUpdatedKey = []byte("_enable_validator_updated_")

	//ValidatorUpdateSetKey 保存本块中validator变化结果
	ValidatorUpdateSetKey = []byte("_validator_update_set_")

	//LastBlockProposerKey 上一块验证人
	LastBlockProposerKey = []byte("_last_block_proposer_")
)

Functions

This section is empty.

Types

type ValidatorMapper

type ValidatorMapper struct {
	*mapper.BaseMapper
}

func GetValidatorMapper

func GetValidatorMapper(ctx context.Context) *ValidatorMapper

func NewValidatorMapper

func NewValidatorMapper() *ValidatorMapper

func (*ValidatorMapper) AddValidatorUpdate

func (mapper *ValidatorMapper) AddValidatorUpdate(pubkey crypto.PubKey, power uint64) error

func (*ValidatorMapper) ClearValidatorUpdateSet

func (mapper *ValidatorMapper) ClearValidatorUpdateSet()

func (*ValidatorMapper) Copy

func (mapper *ValidatorMapper) Copy() mapper.IMapper

func (*ValidatorMapper) DisableValidatorUpdated

func (mapper *ValidatorMapper) DisableValidatorUpdated()

func (*ValidatorMapper) EnableValidatorUpdated

func (mapper *ValidatorMapper) EnableValidatorUpdated()

func (*ValidatorMapper) GetLastBlockProposer

func (mapper *ValidatorMapper) GetLastBlockProposer() (address types.ConsAddress, exsits bool)

func (*ValidatorMapper) GetValidatorUpdateSet

func (mapper *ValidatorMapper) GetValidatorUpdateSet() (allValidatorUpdate []abci.ValidatorUpdate)

func (*ValidatorMapper) IsEnableValidatorUpdated

func (mapper *ValidatorMapper) IsEnableValidatorUpdated() bool

func (*ValidatorMapper) SetLastBlockProposer

func (mapper *ValidatorMapper) SetLastBlockProposer(address types.ConsAddress)

func (*ValidatorMapper) SetValidatorUpdateSet

func (mapper *ValidatorMapper) SetValidatorUpdateSet(allValidatorUpdate []abci.ValidatorUpdate)

Jump to

Keyboard shortcuts

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