From 3173bfedeb55394f2ae2e173a7b4af8036eda48c Mon Sep 17 00:00:00 2001 From: nadin-Starkware Date: Wed, 13 Nov 2024 18:57:20 +0200 Subject: [PATCH] chore: add client getters commit-id:d27ad891 --- crates/starknet_sequencer_node/src/clients.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/crates/starknet_sequencer_node/src/clients.rs b/crates/starknet_sequencer_node/src/clients.rs index 084acf25db0..9c92dac9d34 100644 --- a/crates/starknet_sequencer_node/src/clients.rs +++ b/crates/starknet_sequencer_node/src/clients.rs @@ -101,19 +101,37 @@ impl SequencerNodeClients { get_shared_client!(self, batcher_client) } + pub fn get_batcher_client(&self) -> Option<&Client> { + self.batcher_client.as_ref() + } + pub fn get_mempool_shared_client(&self) -> Option { get_shared_client!(self, mempool_client) } + pub fn get_mempool_client(&self) -> Option<&Client> { + self.mempool_client.as_ref() + } + pub fn get_gateway_shared_client(&self) -> Option { get_shared_client!(self, gateway_client) } + pub fn get_gateway_client(&self) -> Option<&Client> { + self.gateway_client.as_ref() + } + pub fn get_mempool_p2p_propagator_shared_client( &self, ) -> Option { get_shared_client!(self, mempool_p2p_propagator_client) } + + pub fn get_mempool_p2p_propagator_client( + &self, + ) -> Option<&Client> { + self.mempool_p2p_propagator_client.as_ref() + } } /// A macro for creating a component client, determined by the component's execution mode. Returns a