diff --git a/x/ibc/07-tendermint/types/test_utils.go b/x/ibc/07-tendermint/types/test_utils.go index 2a2491b148..316a44ff7a 100644 --- a/x/ibc/07-tendermint/types/test_utils.go +++ b/x/ibc/07-tendermint/types/test_utils.go @@ -1,7 +1,6 @@ package types import ( - "math" "time" "github.com/tendermint/tendermint/crypto/tmhash" @@ -9,6 +8,8 @@ import ( "github.com/tendermint/tendermint/version" ) +const maxInt = int(^uint(0) >> 1) + // Copied unimported test functions from tmtypes to use them here func MakeBlockID(hash []byte, partSetSize int, partSetHash []byte) tmtypes.BlockID { return tmtypes.BlockID{ @@ -28,7 +29,7 @@ func CreateTestHeader(chainID string, height int64, timestamp time.Time, valSet ChainID: chainID, Height: height, Time: timestamp, - LastBlockID: MakeBlockID(make([]byte, tmhash.Size), math.MaxInt64, make([]byte, tmhash.Size)), + LastBlockID: MakeBlockID(make([]byte, tmhash.Size), maxInt, make([]byte, tmhash.Size)), LastCommitHash: tmhash.Sum([]byte("last_commit_hash")), DataHash: tmhash.Sum([]byte("data_hash")), ValidatorsHash: vsetHash,