From 21031353341225b41eec141e7c9b51a329ebf636 Mon Sep 17 00:00:00 2001 From: Kirill Lykov Date: Tue, 10 Dec 2024 17:48:24 +0100 Subject: [PATCH] Rename runtime --- core/src/validator.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/core/src/validator.rs b/core/src/validator.rs index 72c6240edb3f27..7d40ce2c8c4b5c 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -154,18 +154,13 @@ use { tokio::runtime::{self, Runtime as TokioRuntime}, }; -static GLOBAL_RUNTIME: LazyLock = LazyLock::new(|| { +static STS_CLIENT_RUNTIME: LazyLock = LazyLock::new(|| { runtime::Builder::new_multi_thread() .enable_all() .build() .expect("Failed to create Tokio runtime") }); -// Function to get a handle to the runtime -fn get_runtime_handle() -> tokio::runtime::Handle { - GLOBAL_RUNTIME.handle().clone() -} - const MAX_COMPLETED_DATA_SETS_IN_CHANNEL: usize = 100_000; const WAIT_FOR_SUPERMAJORITY_THRESHOLD_PERCENT: u64 = 80; // Right now since we reuse the wait for supermajority code, the @@ -1116,7 +1111,7 @@ impl Validator { .map_err(|err| ValidatorError::Other(format!("{err}")))?; let client = TpuClientNextClient::new( - get_runtime_handle(), + STS_CLIENT_RUNTIME.handle().clone(), my_tpu_address, config.send_transaction_service_config.tpu_peers.clone(), Some(leader_info),