validator

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidatorMapperName = "validator"
)

Variables

This section is empty.

Functions

func BuildChangedKey

func BuildChangedKey() []byte

func BuildValidatorKey

func BuildValidatorKey(consAddress btypes.Address) []byte

func EndBlocker

func EndBlocker(ctx context.Context) (res abci.ResponseEndBlock)

func RegisterCodec

func RegisterCodec(cdc *amino.Codec)

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 NewCreateValidatorTx(name string, consPubKey crypto.PubKey, operator btypes.Address) *TxCreateValidator

func (*TxCreateValidator) CalcGas

func (tx *TxCreateValidator) CalcGas() btypes.BigInt

func (*TxCreateValidator) Exec

func (tx *TxCreateValidator) Exec(ctx context.Context) (result btypes.Result, crossTxQcp *txs.TxQcp)

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 (mapper *ValidatorMapper) GetByConsAddress(consAddress btypes.Address) (types.Validator, bool)

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()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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