From 188f6c92c0281a8542e7cdd5b56bb79b44067aac Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Thu, 3 Oct 2024 12:43:48 -0500 Subject: [PATCH] review: simplify allConsumers to not use index --- local-interchain/chains/README.md | 3 +-- local-interchain/interchain/start.go | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/local-interchain/chains/README.md b/local-interchain/chains/README.md index 3a77cfea0..6feb25125 100644 --- a/local-interchain/chains/README.md +++ b/local-interchain/chains/README.md @@ -5,9 +5,8 @@ Current the neutron heighliner image does not work due to some /tmp issue in the docker image. For this reason, you must compile the image yourself to use the latest v50 instance. ```bash -git clone https://github.com/neutron-org/neutron.git +git clone https://github.com/neutron-org/neutron.git --depth 1 --branch v4.2.1 cd neutron -git checkout v4.2.1 # neutron-node:latest make build-e2e-docker-image diff --git a/local-interchain/interchain/start.go b/local-interchain/interchain/start.go index 71a591f63..2d93d273c 100644 --- a/local-interchain/interchain/start.go +++ b/local-interchain/interchain/start.go @@ -146,14 +146,14 @@ func StartChain(installDir, chainCfgFile string, ac *types.AppStartConfig) { for provider, consumers := range icsPair { var p ibc.Chain - allConsumers := make([]ibc.Chain, len(consumers)) - for idx, consumer := range consumers { + allConsumers := []ibc.Chain{} + for _, consumer := range consumers { for _, chain := range chains { if chain.Config().ChainID == provider { p = chain } if chain.Config().ChainID == consumer { - allConsumers[idx] = chain + allConsumers = append(allConsumers, chain) } } }