-
Notifications
You must be signed in to change notification settings - Fork 10
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
base: master
Are you sure you want to change the base?
module independent #103
Conversation
update identity、node、params、upgrade test
…iritamod into sv/module-independent
modules/upgrade/keeper/keeper.go
Outdated
func (k Keeper) UpgradeKeeper() *upgradekeeper.Keeper { | ||
return k.uk | ||
return k.Keeper | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
modules/upgrade/keeper/keeper.go
Outdated
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) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
modules/upgrade/depinject.go
Outdated
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()) |
There was a problem hiding this comment.
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
e786a36
to
936a181
Compare
…iritamod into sv/module-independent # Conflicts: # modules/upgrade/depinject.go # modules/upgrade/keeper/keeper.go # modules/upgrade/test/keeper_test.go
No description provided.