From 55fb510c308a1022a542ceae7354be4d83b49e07 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Wed, 6 Jul 2022 17:52:25 -0500 Subject: [PATCH] Remove the EndBlock ordering constraints, that didn't matter before (#1981) * Remove the EndBlock ordering constraints, that didn't matter before * Remove unused superfluid end block logic (cherry picked from commit 28417c0b065c56d0afe6ef75511761c5d0f119d0) # Conflicts: # x/superfluid/abci.go --- app/modules.go | 7 +------ x/superfluid/abci.go | 10 +++++----- x/superfluid/module.go | 1 - 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/modules.go b/app/modules.go index 5de2ff635e9..0d99830644d 100644 --- a/app/modules.go +++ b/app/modules.go @@ -184,13 +184,8 @@ func orderBeginBlockers() []string { func OrderEndBlockers(allModuleNames []string) []string { ord := partialord.NewPartialOrdering(allModuleNames) - // Epochs must run after all other end blocks - ord.LastElements(epochstypes.ModuleName) - // txfees auto-swap code should occur before any potential gamm end block code. - ord.Before(txfeestypes.ModuleName, gammtypes.ModuleName) - // only remaining modules that aren;t no-ops are: crisis & govtypes + // only Osmosis modules with endblock code are: crisis, govtypes, staking // we don't care about the relative ordering between them. - return ord.TotalOrdering() } diff --git a/x/superfluid/abci.go b/x/superfluid/abci.go index c58f7857d9d..dee575e97a6 100644 --- a/x/superfluid/abci.go +++ b/x/superfluid/abci.go @@ -1,10 +1,15 @@ package superfluid import ( +<<<<<<< HEAD abci "github.com/tendermint/tendermint/abci/types" "github.com/osmosis-labs/osmosis/v10/x/superfluid/keeper" "github.com/osmosis-labs/osmosis/v10/x/superfluid/types" +======= + "github.com/osmosis-labs/osmosis/v7/x/superfluid/keeper" + "github.com/osmosis-labs/osmosis/v7/x/superfluid/types" +>>>>>>> 28417c0b (Remove the EndBlock ordering constraints, that didn't matter before (#1981)) sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -19,8 +24,3 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper, ek types.EpochKeeper) { k.AfterEpochStartBeginBlock(ctx) } } - -// Called every block to automatically unlock matured locks. -func EndBlocker(ctx sdk.Context, k keeper.Keeper) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} diff --git a/x/superfluid/module.go b/x/superfluid/module.go index 4bd7c408941..fce32bc55dd 100644 --- a/x/superfluid/module.go +++ b/x/superfluid/module.go @@ -187,7 +187,6 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { // EndBlock executes all ABCI EndBlock logic respective to the capability module. It // returns no validator updates. func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - EndBlocker(ctx, am.keeper) return []abci.ValidatorUpdate{} }