identity

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stake

type Stake struct {
	ValidatorAddress keys.Address
	StakeAddress     keys.Address
	Pubkey           keys.PublicKey
	Name             string
	Amount           balance.Coin
}

type Unstake

type Unstake struct {
	Address keys.Address
	Amount  balance.Coin
}

type Validator

type Validator struct {
	Address      keys.Address   `json:"address"`
	StakeAddress keys.Address   `json:"stakeAddress"`
	PubKey       keys.PublicKey `json:"pubKey"`
	Power        int64          `json:"power"`
	Name         string         `json:"name"`
	Staking      balance.Coin   `json:"staking,string"`
}

func (*Validator) Bytes

func (v *Validator) Bytes() []byte

func (*Validator) FromBytes

func (v *Validator) FromBytes(msg []byte) (*Validator, error)

type ValidatorContext

type ValidatorContext struct {
	Balances *balance.Store
}

func NewValidatorContext

func NewValidatorContext(balances *balance.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 {
	*storage.ChainState
	// contains filtered or unexported fields
}

func NewValidatorStore added in v0.10.4

func NewValidatorStore(cfg config.Server, dbPath string, dbType string) *ValidatorStore

func (*ValidatorStore) Commit added in v0.10.4

func (vs *ValidatorStore) Commit() ([]byte, int64)

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) 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 (*ValidatorStore) Set added in v0.10.4

setup the validators according to begin block

Jump to

Keyboard shortcuts

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