Skip to content

Commit

Permalink
Fix log
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 committed Aug 9, 2024
1 parent 641a3f3 commit bff5c96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/auth/ante/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (sud SetUpContextDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate
if cp := ctx.ConsensusParams(); cp != nil && cp.Block != nil {
// If there exists a maximum block gas limit, we must ensure that the tx
// does not exceed it.
fmt.Printf("[Debug] Checking if gas limit exceed or not, tx gas is %d while block gas limit is %d\n", gasTx.GetGas(), cp.Block.MaxGas)
fmt.Printf("[Debug] Checking if gas limit exceed or not, tx gas is %d while block gas limit is %d at height %d\n", gasTx.GetGas(), cp.Block.MaxGas, ctx.BlockHeight())
if cp.Block.MaxGas > 0 && gasTx.GetGas() > uint64(cp.Block.MaxGas) {
return newCtx, sdkerrors.Wrapf(sdkerrors.ErrInvalidGasLimit, "tx gas limit %d exceeds block max gas %d", gasTx.GetGas(), cp.Block.MaxGas)
}
Expand Down

0 comments on commit bff5c96

Please sign in to comment.