diff --git a/node/tests/src/main.rs b/node/tests/src/main.rs index c307f8d8..ac60f3ec 100644 --- a/node/tests/src/main.rs +++ b/node/tests/src/main.rs @@ -18,7 +18,7 @@ use zksync_consensus_tools::k8s::{chaos_mesh::ops::delete_chaos_delay_for_pod, P use crate::utils::{ add_chaos_delay_for_target_pods, check_health_of_node, get_consensus_node_rpc_client, - get_last_commited_block, + get_last_committed_block, }; mod utils; @@ -114,14 +114,14 @@ pub async fn delay_test(test_result: Arc>) -> anyhow::Result<()> { add_chaos_delay_for_target_pods(target_nodes.clone()) .await .unwrap(); - let last_commited_block = get_last_commited_block(rpc_client.clone()).await.unwrap(); + let last_committed_block = get_last_committed_block(rpc_client.clone()).await.unwrap(); delete_chaos_delay_for_pod(target_nodes.first().unwrap()) .await .unwrap(); // Wait for the deletion of the chaos delay. sleep(Duration::from_secs(2)); - let new_last_commited_block = get_last_commited_block(rpc_client).await.unwrap(); - assert!(new_last_commited_block > last_commited_block); + let new_last_committed_block = get_last_committed_block(rpc_client).await.unwrap(); + assert!(new_last_committed_block > last_committed_block); *test_result.lock().unwrap() += 1; Ok(()) } diff --git a/node/tests/src/utils.rs b/node/tests/src/utils.rs index 5a7a54f1..ca15b881 100644 --- a/node/tests/src/utils.rs +++ b/node/tests/src/utils.rs @@ -8,7 +8,7 @@ use jsonrpsee::{ use zksync_consensus_tools::k8s::chaos_mesh; use zksync_consensus_tools::{ k8s::{self, PodId}, - rpc::methods::{health_check, last_commited_block}, + rpc::methods::{health_check, last_committed_block}, }; /// Get the RPC clients for all the consensus nodes. @@ -34,15 +34,15 @@ pub(crate) async fn add_chaos_delay_for_target_pods(target_pods: Vec) -> } /// Get the last commited block using the rpc_client of the consensus node. -pub(crate) async fn get_last_commited_block(rpc_client: HttpClient) -> anyhow::Result { +pub(crate) async fn get_last_committed_block(rpc_client: HttpClient) -> anyhow::Result { let response: serde_json::Value = rpc_client - .request(last_commited_block::method(), rpc_params!()) + .request(last_committed_block::method(), rpc_params!()) .await .context("Failed to get last commited block")?; - let last_commited_block: u64 = - serde_json::from_value(response.get("last_commited_block").unwrap().to_owned()) + let last_committed_block: u64 = + serde_json::from_value(response.get("last_committed_block").unwrap().to_owned()) .context("Failed to parse last commited block")?; - Ok(last_commited_block) + Ok(last_committed_block) } /// Check the health of the consensus node using its rpc_client. diff --git a/node/tools/src/k8s/operations.rs b/node/tools/src/k8s/operations.rs index 0f8fc2cc..fadf6493 100644 --- a/node/tools/src/k8s/operations.rs +++ b/node/tools/src/k8s/operations.rs @@ -388,7 +388,7 @@ pub async fn create_or_reuse_namespace(client: &Client, name: &str) -> anyhow::R } pub async fn expose_tester_rpc(client: &Client) -> anyhow::Result<()> { - let load_balancer_sevice = Service { + let load_balancer_service = Service { metadata: ObjectMeta { name: Some("tester-rpc".to_string()), namespace: Some(DEFAULT_NAMESPACE.to_string()), @@ -410,7 +410,7 @@ pub async fn expose_tester_rpc(client: &Client) -> anyhow::Result<()> { let services: Api = Api::namespaced(client.clone(), DEFAULT_NAMESPACE); let post_params = PostParams::default(); - let result = services.create(&post_params, &load_balancer_sevice).await?; + let result = services.create(&post_params, &load_balancer_service).await?; info!( "Service: {} , created",