refactor: Use CoreAPI when possible (#15496)

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
Facundo Medica
2023-03-23 22:40:09 +00:00
committed by GitHub
co-authored by Aleksandr Bezobchuk Marko
parent b44caab53a
commit 05dcf860eb
22 changed files with 178 additions and 163 deletions
+7 -5
View File
@@ -32,7 +32,6 @@ import (
const ConsensusVersion = 2
var (
_ module.EndBlockAppModule = AppModule{}
_ module.AppModuleBasic = AppModuleBasic{}
_ module.AppModuleSimulation = AppModule{}
)
@@ -56,7 +55,10 @@ func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, ak group.AccountKeeper,
}
}
var _ appmodule.AppModule = AppModule{}
var (
_ appmodule.AppModule = AppModule{}
_ appmodule.HasEndBlocker = AppModule{}
)
// IsOnePerModuleType implements the depinject.OnePerModuleType interface.
func (am AppModule) IsOnePerModuleType() {}
@@ -155,9 +157,9 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion }
// EndBlock implements the group module's EndBlock.
func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate {
EndBlocker(ctx, am.keeper)
return []abci.ValidatorUpdate{}
func (am AppModule) EndBlock(ctx context.Context) error {
c := sdk.UnwrapSDKContext(ctx)
return EndBlocker(c, am.keeper)
}
// ____________________________________________________________________________