Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module independent #103

Open
wants to merge 79 commits into
base: master
Choose a base branch
from
Open

module independent #103

wants to merge 79 commits into from

Conversation

cyilong
Copy link
Member

@cyilong cyilong commented Jul 12, 2024

No description provided.

Comment on lines 55 to 57
func (k Keeper) UpgradeKeeper() *upgradekeeper.Keeper {
return k.uk
return k.Keeper
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Comment on lines 62 to 77
func (k *Keeper) SetUpgradeHandler(name string, upgradeHandler upgradetypes.UpgradeHandler) {
k.uk.SetUpgradeHandler(name, upgradeHandler)
k.Keeper.SetUpgradeHandler(name, upgradeHandler)
}

// ReadUpgradeInfoFromDisk returns the name and height of the upgrade
// which is written to disk by the old binary when panic'ing
// if there's an error in reading the info,
// it assumes that the upgrade info is not available
func (k Keeper) ReadUpgradeInfoFromDisk() (upgradetypes.Plan, error) {
return k.uk.ReadUpgradeInfoFromDisk()
return k.Keeper.ReadUpgradeInfoFromDisk()
}

// IsSkipHeight checks if the given height is part of skipUpgradeHeights
func (k Keeper) IsSkipHeight(height int64) bool {
return k.uk.IsSkipHeight(height)
return k.Keeper.IsSkipHeight(height)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Comment on lines 43 to 45
authority := authtypes.NewModuleAddress(govtypes.ModuleName)
cosmosupgradekeeper := upgradekeeper.NewKeeper(skipUpgradeHeights, in.Key, in.Cdc, "/", nil, authority.String())
keeper := keeper.NewKeeper(
cosmosupgradekeeper,
)
//cosmosupgradekeeper := upgradekeeper.NewKeeper(skipUpgradeHeights, in.Key, in.Cdc, "/", nil, authority.String())
keeper := keeper.NewKeeper(skipUpgradeHeights, in.Key, in.Cdc, "/", nil, authority.String())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

authority should support to be injected by user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants