Skip to content

Commit

Permalink
Optimize simulation gas
Browse files Browse the repository at this point in the history
  • Loading branch information
phamminh0811 committed Sep 16, 2024
1 parent 386d57c commit b133b5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/auth/ante/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (vmd ValidateMemoDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate
}

memoLength := len(memoTx.GetMemo())
if memoLength > 0 {
if memoLength > 0 || simulate {
params := vmd.ak.GetParams(ctx)
if uint64(memoLength) > params.MaxMemoCharacters {
return ctx, sdkerrors.Wrapf(sdkerrors.ErrMemoTooLarge,
Expand Down

0 comments on commit b133b5e

Please sign in to comment.