upgrade

package
v0.10.2-patch Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultCodespace sdk.CodespaceType = "upgrade"

	CodeInvalidMsgType     sdk.CodeType = 100
	CodeUnSupportedMsgType sdk.CodeType = 101
	CodeUnknownRequest     sdk.CodeType = sdk.CodeUnknownRequest
	CodeNotCurrentProposal sdk.CodeType = 102
	CodeNotValidator       sdk.CodeType = 103
	CodeDoubleSwitch       sdk.CodeType = 104
)

Variables

This section is empty.

Functions

func EndBlocker

func EndBlocker(ctx sdk.Context, uk Keeper) (tags sdk.Tags)

do switch

func GetAddressFromSignalKey added in v0.9.1

func GetAddressFromSignalKey(key []byte) string

func GetFailedVersionKey added in v0.10.0

func GetFailedVersionKey(versionID uint64, proposalID uint64) []byte

func GetProposalIDKey

func GetProposalIDKey(proposalID uint64) []byte

func GetSignalKey added in v0.9.0

func GetSignalKey(versionID uint64, switchVoterAddr string) []byte

func GetSignalPrefixKey added in v0.9.1

func GetSignalPrefixKey(versionID uint64) []byte

func GetSuccessVersionKey added in v0.10.0

func GetSuccessVersionKey(versionID uint64) []byte

func GetUpgradeThreshlod added in v0.10.0

func GetUpgradeThreshlod(ctx sdk.Context) sdk.Dec

func InitGenesis

func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)

InitGenesis - build the genesis version For first Version

func IntToHexString added in v0.7.0

func IntToHexString(i int64) string

func NewError

func NewError(codespace sdk.CodespaceType, code sdk.CodeType, msg string) sdk.Error

func RegisterCodec added in v0.7.0

func RegisterCodec(cdc *codec.Codec)

Register concrete types on codec codec

func UintToHexString added in v0.7.0

func UintToHexString(i uint64) string

Types

type GenesisState added in v0.6.0

type GenesisState struct {
	GenesisVersion VersionInfo          `json:genesis_version`
	UpgradeParams  upgradeparams.Params `json:upgrade_govparams`
}

GenesisState - all upgrade state that must be provided at genesis

func DefaultGenesisState added in v0.6.0

func DefaultGenesisState() GenesisState

get raw genesis raw message for testing

func DefaultGenesisStateForTest added in v0.6.0

func DefaultGenesisStateForTest() GenesisState

get raw genesis raw message for testing

func ExportGenesis added in v0.9.0

func ExportGenesis(ctx sdk.Context) GenesisState

WriteGenesis - output genesis parameters

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, protocolKeeper sdk.ProtocolKeeper, sk stake.Keeper) Keeper

func (Keeper) AddNewVersionInfo added in v0.10.0

func (k Keeper) AddNewVersionInfo(ctx sdk.Context, versionInfo VersionInfo)

func (Keeper) DeleteSignal added in v0.9.0

func (k Keeper) DeleteSignal(ctx sdk.Context, protocol uint64, address string)

func (Keeper) GetSignal added in v0.9.0

func (k Keeper) GetSignal(ctx sdk.Context, protocol uint64, address string) bool

func (Keeper) SetSignal added in v0.9.0

func (k Keeper) SetSignal(ctx sdk.Context, protocol uint64, address string)

type VersionInfo added in v0.10.0

type VersionInfo struct {
	UpgradeInfo sdk.UpgradeConfig
	Success     bool
}

func NewVersionInfo added in v0.10.0

func NewVersionInfo(upgradeConfig sdk.UpgradeConfig, success bool) VersionInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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