stake

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ModuleName      = "stake"
	Cdc             = txs.Cdc
	RegisterCodec   = txs.RegisterCodec
	NewGenesis      = types.NewGenesisState
	DefaultGenesis  = types.DefaultGenesisState
	ValidateGenesis = types.ValidateGenesis

	MapperName                             = types.MapperName
	NewMapper                              = mapper.NewMapper
	GetMapper                              = mapper.GetMapper
	Query                                  = mapper.Query
	BuildUnbondingDelegationByHeightPrefix = types.BuildUnbondingDelegationByHeightPrefix
	GetUnbondingDelegationHeightAddress    = types.GetUnbondingDelegationHeightDelegatorValidator
	BuildRedelegationByHeightPrefix        = types.BuildRedelegationByHeightPrefix
	GetRedelegationHeightAddress           = types.GetRedelegationHeightDelegatorFromValidator

	NewCreateValidatorTx = txs.NewCreateValidatorTx

	NewDelegationInfo = types.NewDelegationInfo

	NewUnbondingInfo = types.NewUnbondingDelegationInfo

	ParamSpace    = types.ParamSpace
	DefaultParams = types.DefaultParams

	Active        = types.Active
	Inactive      = types.Inactive
	Revoke        = types.Revoke
	MissVoteBlock = types.MissVoteBlock
	MaxValidator  = types.MaxValidator

	QueryCommands            = client.QueryCommands
	TxCommands               = client.TxCommands
	TxCreateValidatorBuilder = client.TxCreateValidatorBuilder
	BuildCommissionRates     = client.BuildCommissionRates
	NewCommissionRates       = types.NewCommissionRates

	DefaultCommissionRate          = client.DefaultCommissionRate
	DefaultCommissionMaxRate       = client.DefaultCommissionMaxRate
	DefaultCommissionMaxChangeRate = client.DefaultCommissionMaxChangeRate

	BuildCurrentValidatorsAddressKey = types.BuildCurrentValidatorsAddressKey
)

Functions

func BeginBlocker

func BeginBlocker(ctx context.Context, req abci.RequestBeginBlock)

1. 双签惩罚 2. 统计validator投票信息, 将不活跃的validator转成Inactive状态

func CloseInactiveValidator added in v0.0.6

func CloseInactiveValidator(ctx context.Context, survivalSecs int32)

func CollectStdTxs added in v0.0.6

func CollectStdTxs(cdc *amino.Codec, nodeID string, genTxsDir string, genDoc *tmtypes.GenesisDoc) (
	genTxs []btxs.TxStd, persistentPeers string, err error)

func EndBlocker

func EndBlocker(ctx context.Context) []abci.ValidatorUpdate

1. 返还到期unbond tokens 1. 处理到期redelegations 2. 将所有Inactive到一定期限的validator删除 3. 统计新的validator

func ExportGenesis

func ExportGenesis(ctx context.Context) types.GenesisState

func GetUpdatedValidators

func GetUpdatedValidators(ctx context.Context, maxValidatorCount uint64) []abci.ValidatorUpdate

func InitGenesis

func InitGenesis(ctx context.Context, bapp *baseabci.BaseApp, data types.GenesisState) []abci.ValidatorUpdate

func NewAppModule added in v0.0.6

func NewAppModule() types.AppModule

Types

type AppModule added in v0.0.6

type AppModule struct {
	AppModuleBasic
}

app module

func (AppModule) BeginBlock added in v0.0.6

func (am AppModule) BeginBlock(ctx context.Context, req abci.RequestBeginBlock)

func (AppModule) EndBlock added in v0.0.6

func (AppModule) ExportGenesis added in v0.0.6

func (am AppModule) ExportGenesis(ctx context.Context) json.RawMessage

func (AppModule) InitGenesis added in v0.0.6

func (am AppModule) InitGenesis(ctx context.Context, bapp *baseabci.BaseApp, data json.RawMessage) []abci.ValidatorUpdate

func (AppModule) RegisterInvariants added in v0.0.6

func (am AppModule) RegisterInvariants(ir types.InvariantRegistry)

func (AppModule) RegisterQuerier added in v0.0.6

func (am AppModule) RegisterQuerier(qr types.QueryRegistry)

type AppModuleBasic added in v0.0.6

type AppModuleBasic struct{}

app module basics object

func (AppModuleBasic) DefaultGenesis added in v0.0.6

func (amb AppModuleBasic) DefaultGenesis() json.RawMessage

func (AppModuleBasic) GetMapperAndHooks added in v0.0.6

func (amb AppModuleBasic) GetMapperAndHooks() types.MapperWithHooks

func (AppModuleBasic) GetQueryCmds added in v0.0.6

func (amb AppModuleBasic) GetQueryCmds(cdc *amino.Codec) []*cobra.Command

func (AppModuleBasic) GetTxCmds added in v0.0.6

func (amb AppModuleBasic) GetTxCmds(cdc *amino.Codec) []*cobra.Command

func (AppModuleBasic) Name added in v0.0.6

func (amb AppModuleBasic) Name() string

func (AppModuleBasic) RegisterCodec added in v0.0.6

func (amb AppModuleBasic) RegisterCodec(cdc *amino.Codec)

func (AppModuleBasic) ValidateGenesis added in v0.0.6

func (amb AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

type Delegation added in v0.0.6

type Delegation = types.DelegationInfo

type DelegationInfoState

type DelegationInfoState = types.DelegationInfoState

type Description added in v0.0.6

type Description = types.Description

type GenesisState

type GenesisState = types.GenesisState

type Hooks added in v0.0.6

type Hooks = types.Hooks

type Params added in v0.0.6

type Params = types.Params

type ReDelegationInfo added in v0.0.6

type ReDelegationInfo = types.RedelegationInfo

type TxCreateValidator

type TxCreateValidator = txs.TxCreateValidator

type UnbondingDelegationInfo added in v0.0.6

type UnbondingDelegationInfo = types.UnbondingDelegationInfo

type Validator added in v0.0.6

type Validator = types.Validator

type ValidatorVoteInWindowInfoState

type ValidatorVoteInWindowInfoState = types.ValidatorVoteInWindowInfoState

type ValidatorVoteInfoState

type ValidatorVoteInfoState = types.ValidatorVoteInfoState

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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