Skip to content

Commit

Permalink
avoid invalid consensus params when set unlimited max gas for sim test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Jun 22, 2023
1 parent fa218ad commit 98d8a19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/simulation/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package simulation
import (
"encoding/json"
"fmt"
"math"
"math/rand"

cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
Expand Down Expand Up @@ -187,7 +188,7 @@ func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSO
consensusParams := &cmtproto.ConsensusParams{
Block: &cmtproto.BlockParams{
MaxBytes: int64(simulation.RandIntBetween(r, 20000000, 30000000)),
MaxGas: -1,
MaxGas: math.MaxInt64,
},
Validator: &cmtproto.ValidatorParams{
PubKeyTypes: []string{types.ABCIPubKeyTypeEd25519},
Expand Down

0 comments on commit 98d8a19

Please sign in to comment.