reth_prune_types/
event.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::PrunedSegmentInfo;
use alloy_primitives::BlockNumber;
use std::time::Duration;

/// An event emitted by a pruner.
#[derive(Debug, PartialEq, Eq, Clone)]
pub enum PrunerEvent {
    /// Emitted when pruner started running.
    Started {
        /// The tip block number before pruning.
        tip_block_number: BlockNumber,
    },
    /// Emitted when pruner finished running.
    Finished {
        /// The tip block number before pruning.
        tip_block_number: BlockNumber,
        /// The elapsed time for the pruning process.
        elapsed: Duration,
        /// Collected pruning stats.
        stats: Vec<PrunedSegmentInfo>,
    },
}