perf: Make recheck not re-run validate basic (#20208)
This commit is contained in:
parent
84712ede65
commit
92ae8850e1
@ -94,6 +94,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
|
||||
* (x/genutil) [#19735](https://github.com/cosmos/cosmos-sdk/pull/19735) Update genesis api to match new `appmodule.HasGenesis` interface.
|
||||
* (server) [#19966](https://github.com/cosmos/cosmos-sdk/pull/19966) Return BlockHeader by shallow copy in server Context.
|
||||
* (proto) [#20098](https://github.com/cosmos/cosmos-sdk/pull/20098) Use cosmos_proto added_in annotation instead of // Since comments.
|
||||
* (baseapp) [#20208](https://github.com/cosmos/cosmos-sdk/pull/20208) Skip running validateBasic for rechecking txs.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
||||
@ -871,8 +871,12 @@ func (app *BaseApp) runTx(mode execMode, txBytes []byte) (gInfo sdk.GasInfo, res
|
||||
}
|
||||
|
||||
msgs := tx.GetMsgs()
|
||||
if err := validateBasicTxMsgs(app.msgServiceRouter, msgs); err != nil {
|
||||
return sdk.GasInfo{}, nil, nil, err
|
||||
// run validate basic if mode != recheck.
|
||||
// as validate basic is stateless, it is guaranteed to pass recheck, given that its passed checkTx.
|
||||
if mode != execModeReCheck {
|
||||
if err := validateBasicTxMsgs(app.msgServiceRouter, msgs); err != nil {
|
||||
return sdk.GasInfo{}, nil, nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if app.anteHandler != nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user