From 3d5794f2df135cba547c6217b823044437fc6c55 Mon Sep 17 00:00:00 2001 From: Alexander Melnikov Date: Tue, 1 Oct 2024 12:48:36 -0600 Subject: [PATCH] ports scanner fix --- .../crates/zk_inception/src/commands/chain/init/configs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zk_toolbox/crates/zk_inception/src/commands/chain/init/configs.rs b/zk_toolbox/crates/zk_inception/src/commands/chain/init/configs.rs index 8edcd9d1c7ce..e6b9fa7117d4 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/chain/init/configs.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/chain/init/configs.rs @@ -47,9 +47,10 @@ pub async fn init_configs( ecosystem_config: &EcosystemConfig, chain_config: &ChainConfig, ) -> anyhow::Result { + // Port scanner should run before copying configs to avoid marking initial ports as assigned + let mut ecosystem_ports = EcosystemPortsScanner::scan(shell)?; copy_configs(shell, &ecosystem_config.link_to_code, &chain_config.configs)?; - let mut ecosystem_ports = EcosystemPortsScanner::scan(shell)?; if !init_args.no_port_reallocation { ecosystem_ports.allocate_ports_in_yaml( shell,