Call end block function in each cosmos modules#1683
Conversation
| // updates. | ||
| func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { | ||
| func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { | ||
| EndBlocker(ctx, am.keeper) |
There was a problem hiding this comment.
Hum end blocker is empty in each module. What is the point of calling it?
There was a problem hiding this comment.
Making sure that it's called when we need it, I was experimenting with the pagination and found this issue
Hum, I'm not sure why this code works and how, but EndBlock is empty and dose nothing in each module. Also you have change BeginBlockers order which on which I'm not sure if they are good. app.mm.SetOrderBeginBlockers(distr.ModuleName, slashing.ModuleName)
>>> app.mm.SetOrderEndBlockers(staking.ModuleName)So I would rather add only this one and check if its' working. |
250663e to
5d41033
Compare
|
I just reverted the modification on the begin/end order. Now the PR just call the |
NicolasMahe
left a comment
There was a problem hiding this comment.
i don't think this PR is necessary but it doesn't cause any new issue, so i'm good with merging it
|
What about calling Order explicit like we disscuss? I'm ok to merge this one too, although as @NicolasMahe point it's not necessary. Also if you want to be consistent you should call BeginBlock as well :P |
|
I just wanted to revert it and maybe put it in another PR as it creates too much discussion and I want to try to have more details about that. |
The
EndBlockerof the module was not called by the module and also theseEndBlockfor each module were not called because of a wrong initialization of the app.