Skip to content

Commit

Permalink
fix: chan buf
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Sep 11, 2024
1 parent fee8fd1 commit 0240ba7
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -46,9 +46,7 @@ where
{
pub fn new(source: Source, poll_interval: Option<Duration>) -> Self {
#[allow(clippy::arithmetic_side_effects)]
let (sender, receiver) = tokio::sync::mpsc::channel(
core::mem::size_of::<DaBlockCosts>() * CACHE_COUNT,
);
let (sender, receiver) = tokio::sync::mpsc::channel(CHANNEL_BUFFER_SIZE);
let block_cost_provider = DaBlockCostsProvider::from_receiver(receiver);
Self {
sender,
Expand Down

0 comments on commit 0240ba7

Please sign in to comment.