feat(cli): expose tree engine persistence configuration (#10999)

This commit is contained in:
Roman Krasiuk
2024-09-18 20:24:01 +02:00
committed by GitHub
parent c09f650a3a
commit f64aecfbc8
9 changed files with 95 additions and 12 deletions

View File

@@ -1,10 +1,10 @@
//! Engine tree configuration.
/// Triggers persistence when the number of canonical blocks in memory exceeds this threshold.
const DEFAULT_PERSISTENCE_THRESHOLD: u64 = 2;
pub const DEFAULT_PERSISTENCE_THRESHOLD: u64 = 2;
/// How close to the canonical head we persist blocks.
const DEFAULT_MEMORY_BLOCK_BUFFER_TARGET: u64 = 2;
pub const DEFAULT_MEMORY_BLOCK_BUFFER_TARGET: u64 = 2;
const DEFAULT_BLOCK_BUFFER_LIMIT: u32 = 256;
const DEFAULT_MAX_INVALID_HEADER_CACHE_LENGTH: u32 = 256;

View File

@@ -60,7 +60,7 @@ use tokio::sync::{
};
use tracing::*;
mod config;
pub mod config;
mod invalid_block_hook;
mod metrics;
use crate::{engine::EngineApiRequest, tree::metrics::EngineApiMetrics};