mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
chore(exex):move maximum ExExManager capacity to a constant (#11293)
Co-authored-by: Oliver <onbjerg@users.noreply.github.com>
This commit is contained in:
@ -25,6 +25,12 @@ use tokio::sync::{
|
||||
};
|
||||
use tokio_util::sync::{PollSendError, PollSender, ReusableBoxFuture};
|
||||
|
||||
/// Default max size of the internal state notifications buffer.
|
||||
///
|
||||
/// 1024 notifications in the buffer is 3.5 hours of mainnet blocks,
|
||||
/// or 17 minutes of 1-second blocks.
|
||||
pub const DEFAULT_EXEX_MANAGER_CAPACITY: usize = 1024;
|
||||
|
||||
/// Metrics for an `ExEx`.
|
||||
#[derive(Metrics)]
|
||||
#[metrics(scope = "exex")]
|
||||
|
||||
@ -5,7 +5,9 @@ use std::{fmt, fmt::Debug};
|
||||
use futures::future;
|
||||
use reth_chain_state::ForkChoiceSubscriptions;
|
||||
use reth_chainspec::EthChainSpec;
|
||||
use reth_exex::{ExExContext, ExExHandle, ExExManager, ExExManagerHandle, Wal};
|
||||
use reth_exex::{
|
||||
ExExContext, ExExHandle, ExExManager, ExExManagerHandle, Wal, DEFAULT_EXEX_MANAGER_CAPACITY,
|
||||
};
|
||||
use reth_node_api::{FullNodeComponents, NodeTypes};
|
||||
use reth_primitives::Head;
|
||||
use reth_provider::CanonStateSubscriptions;
|
||||
@ -108,7 +110,7 @@ impl<Node: FullNodeComponents + Clone> ExExLauncher<Node> {
|
||||
// todo(onbjerg): rm magic number
|
||||
let exex_manager = ExExManager::new(
|
||||
exex_handles,
|
||||
1024,
|
||||
DEFAULT_EXEX_MANAGER_CAPACITY,
|
||||
exex_wal,
|
||||
components.provider().finalized_block_stream(),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user