-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: remove txs from mempool when antehandler fails in recheck #20144
Changes from 9 commits
605b996
bd66084
70bffb8
f5da247
0b802b1
9f8e928
3d56c95
54ef009
03732a3
f30f863
cb3d39c
7c5b671
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -911,6 +911,12 @@ func (app *BaseApp) runTx(mode execMode, txBytes []byte) (gInfo sdk.GasInfo, res | |
gasWanted = ctx.GasMeter().Limit() | ||
|
||
if err != nil { | ||
if mode == execModeReCheck { | ||
// if the ante handler fails on recheck, we want to remove the tx from the mempool | ||
if err := app.mempool.Remove(tx); err != nil { | ||
tac0turtle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return gInfo, nil, anteEvents, errors.Join(err, err) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change potentially affects state. Call sequence:
facundomedica marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change potentially affects state. Call sequence:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change potentially affects state. Call sequence:
|
||
} | ||
} | ||
tac0turtle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return gInfo, nil, nil, err | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify slice operation.
Committable suggestion