Documentation ¶
Index ¶
- type Stake
- type Unstake
- type Validator
- type ValidatorContext
- type ValidatorQueue
- type ValidatorStore
- func (vs *ValidatorStore) Exists(addr keys.Address) bool
- func (vs *ValidatorStore) Get(addr keys.Address) (*Validator, error)
- func (vs *ValidatorStore) GetBitcoinKeys(net *chaincfg.Params) (list []*btcutil.AddressPubKey, err error)
- func (vs *ValidatorStore) GetEndBlockUpdate(ctx *ValidatorContext, req types.RequestEndBlock) []types.ValidatorUpdate
- func (vs *ValidatorStore) GetValidatorSet() ([]Validator, error)
- func (vs *ValidatorStore) GetValidatorsAddress() ([]keys.Address, error)
- func (vs *ValidatorStore) HandleStake(apply Stake) error
- func (vs *ValidatorStore) HandleUnstake(unstake Unstake) error
- func (vs *ValidatorStore) Init(req types.RequestInitChain, currencies *balance.CurrencySet) (types.ValidatorUpdates, error)
- func (vs *ValidatorStore) IsValidator() bool
- func (vs *ValidatorStore) IsValidatorAddress(addr keys.Address) bool
- func (vs *ValidatorStore) Iterate(fn func(addr keys.Address, validator *Validator) bool) (stopped bool)
- func (vs *ValidatorStore) Setup(req types.RequestBeginBlock, nodeValidatorAddress keys.Address) error
- func (vs *ValidatorStore) WithState(state *storage.State) *ValidatorStore
- type Witness
- type WitnessStore
- func (ws *WitnessStore) AddWitness(chain chain.Type, apply Stake) error
- func (ws *WitnessStore) Exists(chain chain.Type, addr keys.Address) bool
- func (ws *WitnessStore) Get(chain chain.Type, addr keys.Address) (*Witness, error)
- func (ws *WitnessStore) GetWitnessAddresses(chain chain.Type) ([]keys.Address, error)
- func (ws *WitnessStore) Init(chain chain.Type, nodeValidatorAddress keys.Address)
- func (ws *WitnessStore) IsETHWitness() bool
- func (ws *WitnessStore) IsWitnessAddress(chain chain.Type, addr keys.Address) bool
- func (ws *WitnessStore) Iterate(chain chain.Type, fn func(addr keys.Address, witness *Witness) bool) (stopped bool)
- func (ws *WitnessStore) WithState(state *storage.State) *WitnessStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Validator ¶
type ValidatorContext ¶
func NewValidatorContext ¶
func NewValidatorContext(balances *balance.Store, feePool *fees.Store) *ValidatorContext
type ValidatorQueue ¶ added in v0.10.4
type ValidatorQueue struct {
utils.PriorityQueue
}
func (*ValidatorQueue) Init ¶ added in v0.10.4
func (vq *ValidatorQueue) Init()
func (*ValidatorQueue) Len ¶ added in v0.10.4
func (vq *ValidatorQueue) Len() int
func (*ValidatorQueue) Pop ¶ added in v0.10.4
func (vq *ValidatorQueue) Pop() *utils.Queued
func (*ValidatorQueue) Push ¶ added in v0.10.4
func (vq *ValidatorQueue) Push(queued *utils.Queued)
type ValidatorStore ¶ added in v0.10.4
type ValidatorStore struct {
// contains filtered or unexported fields
}
func NewValidatorStore ¶ added in v0.10.4
func NewValidatorStore(prefix string, state *storage.State) *ValidatorStore
func (*ValidatorStore) Exists ¶ added in v0.13.0
func (vs *ValidatorStore) Exists(addr keys.Address) bool
func (*ValidatorStore) Get ¶ added in v0.12.0
func (vs *ValidatorStore) Get(addr keys.Address) (*Validator, error)
func (*ValidatorStore) GetBitcoinKeys ¶ added in v0.13.0
func (vs *ValidatorStore) GetBitcoinKeys(net *chaincfg.Params) (list []*btcutil.AddressPubKey, err error)
func (*ValidatorStore) GetEndBlockUpdate ¶ added in v0.10.4
func (vs *ValidatorStore) GetEndBlockUpdate(ctx *ValidatorContext, req types.RequestEndBlock) []types.ValidatorUpdate
func (*ValidatorStore) GetValidatorSet ¶ added in v0.10.4
func (vs *ValidatorStore) GetValidatorSet() ([]Validator, error)
get validators set
func (*ValidatorStore) GetValidatorsAddress ¶ added in v0.13.0
func (vs *ValidatorStore) GetValidatorsAddress() ([]keys.Address, error)
get validators set
func (*ValidatorStore) HandleStake ¶ added in v0.10.4
func (vs *ValidatorStore) HandleStake(apply Stake) error
handle stake action
func (*ValidatorStore) HandleUnstake ¶ added in v0.10.4
func (vs *ValidatorStore) HandleUnstake(unstake Unstake) error
func (*ValidatorStore) Init ¶ added in v0.10.4
func (vs *ValidatorStore) Init(req types.RequestInitChain, currencies *balance.CurrencySet) (types.ValidatorUpdates, error)
func (*ValidatorStore) IsValidator ¶ added in v0.13.0
func (vs *ValidatorStore) IsValidator() bool
func (*ValidatorStore) IsValidatorAddress ¶ added in v0.13.0
func (vs *ValidatorStore) IsValidatorAddress(addr keys.Address) bool
func (*ValidatorStore) Setup ¶ added in v0.12.0
func (vs *ValidatorStore) Setup(req types.RequestBeginBlock, nodeValidatorAddress keys.Address) error
setup the validators according to begin block
func (*ValidatorStore) WithState ¶ added in v0.12.0
func (vs *ValidatorStore) WithState(state *storage.State) *ValidatorStore
type Witness ¶ added in v0.14.0
type WitnessStore ¶ added in v0.14.0
type WitnessStore struct {
// contains filtered or unexported fields
}
func NewWitnessStore ¶ added in v0.14.0
func NewWitnessStore(prefix string, state *storage.State) *WitnessStore
func (*WitnessStore) AddWitness ¶ added in v0.14.0
func (ws *WitnessStore) AddWitness(chain chain.Type, apply Stake) error
Add a witness to store
func (*WitnessStore) GetWitnessAddresses ¶ added in v0.14.0
Get witness addresses
func (*WitnessStore) Init ¶ added in v0.14.0
func (ws *WitnessStore) Init(chain chain.Type, nodeValidatorAddress keys.Address)
func (*WitnessStore) IsETHWitness ¶ added in v0.14.0
func (ws *WitnessStore) IsETHWitness() bool
This node is a ethereum witness or not
func (*WitnessStore) IsWitnessAddress ¶ added in v0.14.0
func (*WitnessStore) WithState ¶ added in v0.14.0
func (ws *WitnessStore) WithState(state *storage.State) *WitnessStore
Click to show internal directories.
Click to hide internal directories.