diff --git a/modules/apps/27-interchain-accounts/host/types/params_test.go b/modules/apps/27-interchain-accounts/host/types/params_test.go index 5adf0af79b6..bc443707ba4 100644 --- a/modules/apps/27-interchain-accounts/host/types/params_test.go +++ b/modules/apps/27-interchain-accounts/host/types/params_test.go @@ -14,5 +14,5 @@ func TestValidateParams(t *testing.T) { require.Error(t, types.NewParams(true, []string{""}).Validate()) require.Error(t, types.NewParams(true, []string{" "}).Validate()) require.Error(t, types.NewParams(true, []string{"*", "/cosmos.bank.v1beta1.MsgSend"}).Validate()) - require.Error(t, types.NewParams(true, make([]string, 1000)).Validate()) + require.Error(t, types.NewParams(true, make([]string, types.MaxAllowListLength+1)).Validate()) } diff --git a/modules/core/02-client/types/params_test.go b/modules/core/02-client/types/params_test.go index 75bc4ce5392..7a80749b375 100644 --- a/modules/core/02-client/types/params_test.go +++ b/modules/core/02-client/types/params_test.go @@ -40,7 +40,7 @@ func TestValidateParams(t *testing.T) { {"blank client", NewParams(" "), false}, {"duplicate clients", NewParams(exported.Tendermint, exported.Tendermint), false}, {"allow all clients plus valid client", NewParams(AllowAllClients, exported.Tendermint), false}, - {"too many allowed clients", NewParams(make([]string, 500)...), false}, + {"too many allowed clients", NewParams(make([]string, MaxAllowedClientsLength+1)...), false}, } for _, tc := range testCases { diff --git a/modules/core/03-connection/types/msgs_test.go b/modules/core/03-connection/types/msgs_test.go index e922c07ab2a..e02b79db071 100644 --- a/modules/core/03-connection/types/msgs_test.go +++ b/modules/core/03-connection/types/msgs_test.go @@ -160,8 +160,8 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { {"invalid consensusHeight", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clienttypes.ZeroHeight(), signer), false}, {"empty singer", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, ""), false}, {"invalid version", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{{}}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"too many counterparty versions", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, make([]*types.Version, 200), 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"too many features in counterparty version", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{{"v1", make([]string, 200)}}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"too many counterparty versions", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, make([]*types.Version, types.MaxCounterpartyVersionsLength+1), 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"too many features in counterparty version", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{{"v1", make([]string, types.MaxFeaturesLength+1)}}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, {"success", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), true}, }