From 087473acf70877fb6dcf6f246e52e73645cb8106 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Fri, 20 Sep 2024 11:23:33 -0500 Subject: [PATCH] fix: no len check on Validators --- examples/ibc/ics_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/ibc/ics_test.go b/examples/ibc/ics_test.go index 14caa0f47..9237e7855 100644 --- a/examples/ibc/ics_test.go +++ b/examples/ibc/ics_test.go @@ -68,15 +68,17 @@ func icsTest(t *testing.T, version string, rly ibc.RelayerImplementation) { consumerBechPrefix = "consumer" } + validators := 2 + cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ { Name: "ics-provider", Version: version, - NumValidators: &numVals, NumFullNodes: &numFullNodes, + NumValidators: &validators, NumFullNodes: &numFullNodes, ChainConfig: ibc.ChainConfig{GasAdjustment: 1.5, ChainID: providerChainID, TrustingPeriod: "336h"}, }, { Name: "ics-consumer", Version: version, - NumValidators: &numVals, NumFullNodes: &numFullNodes, + NumValidators: &validators, NumFullNodes: &numFullNodes, ChainConfig: ibc.ChainConfig{GasAdjustment: 1.5, ChainID: "consumer-1", Bech32Prefix: consumerBechPrefix, InterchainSecurityConfig: ibc.ICSConfig{ ConsumerCopyProviderKey: func(i int) bool { return i == 0 @@ -125,6 +127,8 @@ func icsTest(t *testing.T, version string, rly ibc.RelayerImplementation) { // ------------------ ICS Setup ------------------ + require.Greater(t, len(provider.Validators), 2) + // Finish the ICS provider chain initialization. // - Restarts the relayer to connect ics20-1 transfer channel // - Delegates tokens to the provider to update consensus value