From 0240ba73df738cfed0bb1831a4ca24ca2effb635 Mon Sep 17 00:00:00 2001 From: rymnc <43716372+rymnc@users.noreply.github.com> Date: Wed, 11 Sep 2024 19:37:28 +0530 Subject: [PATCH] fix: chan buf --- .../src/fuel_gas_price_updater/da_source_adapter/service.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/services/gas_price_service/src/fuel_gas_price_updater/da_source_adapter/service.rs b/crates/services/gas_price_service/src/fuel_gas_price_updater/da_source_adapter/service.rs index 00521500c36..421ac53b0dd 100644 --- a/crates/services/gas_price_service/src/fuel_gas_price_updater/da_source_adapter/service.rs +++ b/crates/services/gas_price_service/src/fuel_gas_price_updater/da_source_adapter/service.rs @@ -25,7 +25,7 @@ use tokio::{ pub use anyhow::Result; -const CACHE_COUNT: usize = 10; +const CHANNEL_BUFFER_SIZE: usize = 10; /// This struct houses the shared_state, polling interval /// and a source, which does the actual fetching of the data @@ -46,9 +46,7 @@ where { pub fn new(source: Source, poll_interval: Option) -> Self { #[allow(clippy::arithmetic_side_effects)] - let (sender, receiver) = tokio::sync::mpsc::channel( - core::mem::size_of::() * CACHE_COUNT, - ); + let (sender, receiver) = tokio::sync::mpsc::channel(CHANNEL_BUFFER_SIZE); let block_cost_provider = DaBlockCostsProvider::from_receiver(receiver); Self { sender,