keeper

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const AppVersionTag = "app_version"

Variables

View Source
var (
	CurrentProtocolVersionKey = []byte("currentProtocolVersionKey")
	UpgradeConfigkey          = []byte("upgradeConfigkey")
	LastFailureVersionKey     = []byte("lastFailureVersionKey")
)

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Register concrete types on codec codec

Types

type Keeper

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

func NewKeeper

func NewKeeper(cdc *codec.Codec, storeKey sdk.StoreKey) Keeper

func (Keeper) ClearUpgradeConfig

func (keeper Keeper) ClearUpgradeConfig(ctx sdk.Context)

func (Keeper) GetCurrentProtocolVersion

func (keeper Keeper) GetCurrentProtocolVersion(ctx sdk.Context) uint64

func (Keeper) GetCurrentProtocolVersionByStore

func (keeper Keeper) GetCurrentProtocolVersionByStore(kvStore sdk.KVStore) uint64

func (Keeper) GetLastFailureVersion

func (keeper Keeper) GetLastFailureVersion(ctx sdk.Context) uint64

func (Keeper) GetUpgradeConfig

func (keeper Keeper) GetUpgradeConfig(ctx sdk.Context) (upgradeConfig UpgradeConfig, found bool)

func (Keeper) GetUpgradeConfigByStore

func (keeper Keeper) GetUpgradeConfigByStore(kvStore sdk.KVStore) (upgradeConfig UpgradeConfig, found bool)

func (Keeper) IsValidProtocolVersion

func (Keeper Keeper) IsValidProtocolVersion(ctx sdk.Context, protocolVersion uint64) bool

func (Keeper) SetCurrentProtocolVersion

func (keeper Keeper) SetCurrentProtocolVersion(ctx sdk.Context, currentProtocolVersion uint64)

func (Keeper) SetLastFailureVersion

func (keeper Keeper) SetLastFailureVersion(ctx sdk.Context, lastFailureVersion uint64)

func (Keeper) SetUpgradeConfig

func (keeper Keeper) SetUpgradeConfig(ctx sdk.Context, upgradeConfig UpgradeConfig)

type UpgradeConfig

type UpgradeConfig struct {
	ProposalID uint64
	Definition common.ProtocolDefinition
}

Jump to

Keyboard shortcuts

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