Skip to content

Commit

Permalink
Remove the EndBlock ordering constraints, that didn't matter before (#…
Browse files Browse the repository at this point in the history
…1981)

* Remove the EndBlock ordering constraints, that didn't matter before

* Remove unused superfluid end block logic

(cherry picked from commit 28417c0)

# Conflicts:
#	x/superfluid/abci.go
  • Loading branch information
ValarDragon authored and mergify[bot] committed Jul 12, 2022
1 parent 2c6aa5f commit 55fb510
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
7 changes: 1 addition & 6 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
10 changes: 5 additions & 5 deletions x/superfluid/abci.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand All @@ -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{}
}
1 change: 0 additions & 1 deletion x/superfluid/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
}

Expand Down

0 comments on commit 55fb510

Please sign in to comment.