Documentation ¶
Index ¶
- Constants
- Variables
- type ValidatorMapper
- func (mapper *ValidatorMapper) AddValidatorUpdate(pubkey crypto.PubKey, power uint64) error
- func (mapper *ValidatorMapper) ClearValidatorUpdateSet()
- func (mapper *ValidatorMapper) Copy() mapper.IMapper
- func (mapper *ValidatorMapper) DisableValidatorUpdated()
- func (mapper *ValidatorMapper) EnableValidatorUpdated()
- func (mapper *ValidatorMapper) GetLastBlockProposer() (address types.Address, exsits bool)
- func (mapper *ValidatorMapper) GetValidatorUpdateSet() (allValidatorUpdate []abci.ValidatorUpdate)
- func (mapper *ValidatorMapper) IsEnableValidatorUpdated() bool
- func (mapper *ValidatorMapper) SetLastBlockProposer(address types.Address)
- func (mapper *ValidatorMapper) SetValidatorUpdateSet(allValidatorUpdate []abci.ValidatorUpdate)
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)
Click to show internal directories.
Click to hide internal directories.