Documentation
¶
Index ¶
- Constants
- func BuildChangedKey() []byte
- func BuildValidatorKey(consAddress btypes.Address) []byte
- func EndBlocker(ctx context.Context) (res abci.ResponseEndBlock)
- func RegisterCodec(cdc *amino.Codec)
- type TxCreateValidator
- func (tx *TxCreateValidator) CalcGas() btypes.BigInt
- func (tx *TxCreateValidator) Exec(ctx context.Context) (result btypes.Result, crossTxQcp *txs.TxQcp)
- func (tx *TxCreateValidator) GetGasPayer() btypes.Address
- func (tx *TxCreateValidator) GetSignData() (ret []byte)
- func (tx *TxCreateValidator) GetSigner() []btypes.Address
- func (tx *TxCreateValidator) ValidateData(ctx context.Context) error
- type ValidatorMapper
- func (mapper *ValidatorMapper) Copy() mapper.IMapper
- func (mapper *ValidatorMapper) Exists(consAddress btypes.Address) bool
- func (mapper *ValidatorMapper) GetByConsAddress(consAddress btypes.Address) (types.Validator, bool)
- func (mapper *ValidatorMapper) GetValidators() (validators []types.Validator)
- func (mapper *ValidatorMapper) IsValidatorChanged() bool
- func (mapper *ValidatorMapper) SaveValidator(validator types.Validator)
- func (mapper *ValidatorMapper) SetValidatorChanged()
- func (mapper *ValidatorMapper) SetValidatorUnChanged()
Constants ¶
View Source
const (
ValidatorMapperName = "validator"
)
Variables ¶
This section is empty.
Functions ¶
func BuildChangedKey ¶
func BuildChangedKey() []byte
func BuildValidatorKey ¶
func EndBlocker ¶
func EndBlocker(ctx context.Context) (res abci.ResponseEndBlock)
func RegisterCodec ¶
Types ¶
type TxCreateValidator ¶
type TxCreateValidator struct {
Name string `json:"name""`
ConsPubKey crypto.PubKey `json:"cons_pubkey"` //参与共识的validator公钥
Operator btypes.Address `json:"operator"` //QOS操作账户地址
}
func NewCreateValidatorTx ¶
func (*TxCreateValidator) CalcGas ¶
func (tx *TxCreateValidator) CalcGas() btypes.BigInt
func (*TxCreateValidator) GetGasPayer ¶
func (tx *TxCreateValidator) GetGasPayer() btypes.Address
func (*TxCreateValidator) GetSignData ¶
func (tx *TxCreateValidator) GetSignData() (ret []byte)
func (*TxCreateValidator) GetSigner ¶
func (tx *TxCreateValidator) GetSigner() []btypes.Address
func (*TxCreateValidator) ValidateData ¶
func (tx *TxCreateValidator) ValidateData(ctx context.Context) error
type ValidatorMapper ¶
type ValidatorMapper struct {
*mapper.BaseMapper
}
func NewValidatorMapper ¶
func NewValidatorMapper() *ValidatorMapper
func (*ValidatorMapper) Copy ¶
func (mapper *ValidatorMapper) Copy() mapper.IMapper
func (*ValidatorMapper) Exists ¶
func (mapper *ValidatorMapper) Exists(consAddress btypes.Address) bool
是否已经存在
func (*ValidatorMapper) GetByConsAddress ¶
func (*ValidatorMapper) GetValidators ¶
func (mapper *ValidatorMapper) GetValidators() (validators []types.Validator)
获取所有validator
func (*ValidatorMapper) IsValidatorChanged ¶
func (mapper *ValidatorMapper) IsValidatorChanged() bool
func (*ValidatorMapper) SaveValidator ¶
func (mapper *ValidatorMapper) SaveValidator(validator types.Validator)
保存validator
func (*ValidatorMapper) SetValidatorChanged ¶
func (mapper *ValidatorMapper) SetValidatorChanged()
func (*ValidatorMapper) SetValidatorUnChanged ¶
func (mapper *ValidatorMapper) SetValidatorUnChanged()
Click to show internal directories.
Click to hide internal directories.