mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(prune, stages): prune pipeline stage (#9419)
This commit is contained in:
@ -71,6 +71,8 @@ pub struct StageConfig {
|
||||
pub sender_recovery: SenderRecoveryConfig,
|
||||
/// Execution stage configuration.
|
||||
pub execution: ExecutionConfig,
|
||||
/// Prune stage configuration.
|
||||
pub prune: PruneStageConfig,
|
||||
/// Account Hashing stage configuration.
|
||||
pub account_hashing: HashingConfig,
|
||||
/// Storage Hashing stage configuration.
|
||||
@ -228,6 +230,20 @@ impl From<ExecutionConfig> for ExecutionStageThresholds {
|
||||
}
|
||||
}
|
||||
|
||||
/// Prune stage configuration.
|
||||
#[derive(Debug, Clone, Copy, Deserialize, PartialEq, Eq, Serialize)]
|
||||
#[serde(default)]
|
||||
pub struct PruneStageConfig {
|
||||
/// The maximum number of entries to prune before committing progress to the database.
|
||||
pub commit_threshold: usize,
|
||||
}
|
||||
|
||||
impl Default for PruneStageConfig {
|
||||
fn default() -> Self {
|
||||
Self { commit_threshold: 1_000_000 }
|
||||
}
|
||||
}
|
||||
|
||||
/// Hashing stage configuration.
|
||||
#[derive(Debug, Clone, Copy, Deserialize, PartialEq, Eq, Serialize)]
|
||||
#[serde(default)]
|
||||
|
||||
Reference in New Issue
Block a user