Documentation ¶
Index ¶
Constants ¶
const ( ModuleName = types.ModuleName RouterKey = types.RouterKey StoreKey = types.StoreKey QuerierKey = types.QuerierKey PlanByte = types.PlanByte DoneByte = types.DoneByte InnerAccount = "0x3F43E75Aaba2c2fD6E227C10C6E7DC125A93DE3c" )
Variables ¶
var ( // functions aliases RegisterCodec = types.RegisterCodec PlanKey = types.PlanKey NewKeeper = keeper.NewKeeper NewQuerier = keeper.NewQuerier )
Functions ¶
func BeginBlock ¶
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 NewSoftwareUpgradeProposalHandler ¶
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 UpgradeHandler ¶
type UpgradeHandler = types.UpgradeHandler //nolint:golint