validator

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

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.Address, 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.Address)

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