Files
pezkuwi-sdk/pezcumulus/zombienet/zombienet-sdk/tests/utils.rs
T
pezkuwichain b6d35f6faf chore: add Dijital Kurdistan Tech Institute to copyright headers
Updated 4763 files with dual copyright:
- Parity Technologies (UK) Ltd.
- Dijital Kurdistan Tech Institute
2025-12-27 21:28:36 +03:00

23 lines
775 B
Rust

// Copyright (C) Parity Technologies (UK) Ltd. and Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use zombienet_sdk::{LocalFileSystem, Network, NetworkConfig};
pub const BEST_BLOCK_METRIC: &str = "block_height{status=\"best\"}";
pub async fn initialize_network(
config: NetworkConfig,
) -> Result<Network<LocalFileSystem>, anyhow::Error> {
// Spawn network
let spawn_fn = zombienet_sdk::environment::get_spawn_fn();
let network = spawn_fn(config).await?;
// Do not terminate network after the test is finished.
// This is needed for CI to get logs from k8s.
// Network shall be terminated from CI after logs are downloaded.
// NOTE! For local execution (native provider) below call has no effect.
network.detach().await;
Ok(network)
}