Skip to content
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

fix(baseapp): nil check in posthandler events (backport #19058) #19067

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 15, 2024

This is an automatic backport of pull request #19058 done by Mergify.
Cherry-pick of 73c0741 has failed:

On branch mergify/bp/release/v0.50.x/pr-19058
Your branch is up to date with 'origin/release/v0.50.x'.

You are currently cherry-picking commit 73c074117.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   baseapp/baseapp.go
	modified:   baseapp/baseapp_test.go
	modified:   baseapp/utils_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

(cherry picked from commit 73c0741)

# Conflicts:
#	CHANGELOG.md
@mergify mergify bot requested a review from a team as a code owner January 15, 2024 17:11
@mergify mergify bot added the conflicts label Jan 15, 2024
Comment on lines 936 to +947
// Note that the state is still preserved.
postCtx := runMsgCtx.WithEventManager(sdk.NewEventManager())

newCtx, err := app.postHandler(postCtx, tx, mode == execModeSimulate, err == nil)
if err != nil {
return gInfo, nil, anteEvents, err
newCtx, errPostHandler := app.postHandler(postCtx, tx, mode == execModeSimulate, err == nil)
if errPostHandler != nil {
return gInfo, nil, anteEvents, errors.Join(err, errPostHandler)
}

// we don't want runTx to panic if runMsgs has failed earlier
if result == nil {
result = &sdk.Result{}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change potentially affects state.

Call sequence:

(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).runTx (baseapp/baseapp.go:799)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).deliverTx (baseapp/baseapp.go:729)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).internalFinalizeBlock (baseapp/baseapp.go:692)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).FinalizeBlock (baseapp/baseapp.go:853)

@julienrbrt julienrbrt self-assigned this Jan 15, 2024
@julienrbrt
Copy link
Member

After this ill tag v0.50.3

@julienrbrt julienrbrt removed their assignment Jan 15, 2024
@julienrbrt julienrbrt merged commit 7e6948f into release/v0.50.x Jan 15, 2024
46 of 47 checks passed
@julienrbrt julienrbrt deleted the mergify/bp/release/v0.50.x/pr-19058 branch January 15, 2024 20:24
@faddat faddat mentioned this pull request Nov 8, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant