upgrade

package
v1.6.69 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = types.ModuleName
	RouterKey  = types.RouterKey
	StoreKey   = types.StoreKey
	QuerierKey = types.QuerierKey
	PlanByte   = types.PlanByte
	DoneByte   = types.DoneByte

	InnerAccount = "0x3F43E75Aaba2c2fD6E227C10C6E7DC125A93DE3c"
)

Variables

View Source
var (
	// functions aliases
	RegisterCodec = types.RegisterCodec
	PlanKey       = types.PlanKey

	NewKeeper  = keeper.NewKeeper
	NewQuerier = keeper.NewQuerier
)

Functions

func BeginBlock

func BeginBlock(k Keeper, ctx sdk.Context)

BeginBlock will check if there is a scheduled plan and if it is ready to be executed. If the current height is in the provided set of heights to skip, it will skip and clear the upgrade plan. If it is ready, it will execute it if the handler is installed, and panic/abort otherwise. If the plan is not ready, it will ensure the handler is not registered too early (and abort otherwise).

The purpose is to ensure the binary is switched EXACTLY at the desired block, and to allow a migration to be executed if needed upon this switch (migration defined in the new binary) skipUpgradeHeightArray is a set of block heights for which the upgrade must be skipped

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k keeper.Keeper) types.GenesisState

func NewSoftwareUpgradeProposalHandler

func NewSoftwareUpgradeProposalHandler(k Keeper) sdk.Handler

NewSoftwareUpgradeProposalHandler creates a governance handler to manage new proposal types. It enables SoftwareUpgradeProposal to propose an Upgrade, and CancelSoftwareUpgradeProposal to abort a previously voted upgrade.

Types

type Keeper

type Keeper = keeper.Keeper

type Plan

type Plan = types.Plan

type UpgradeHandler

type UpgradeHandler = types.UpgradeHandler //nolint:golint

Directories

Path Synopsis
client

Jump to

Keyboard shortcuts

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