feat: make PersistenceAction generic over NodePrimitives (#13019)

This commit is contained in:
Léa Narzis
2024-11-30 17:15:47 +01:00
committed by GitHub
parent 5a0b523189
commit ebd413fce2
2 changed files with 9 additions and 9 deletions

View File

@ -169,13 +169,13 @@ pub enum PersistenceError {
/// A signal to the persistence service that part of the tree state can be persisted.
#[derive(Debug)]
pub enum PersistenceAction {
pub enum PersistenceAction<N: NodePrimitives = EthPrimitives> {
/// The section of tree state that should be persisted. These blocks are expected in order of
/// increasing block number.
///
/// First, header, transaction, and receipt-related data should be written to static files.
/// Then the execution history-related data will be written to the database.
SaveBlocks(Vec<ExecutedBlock>, oneshot::Sender<Option<BlockNumHash>>),
SaveBlocks(Vec<ExecutedBlock<N>>, oneshot::Sender<Option<BlockNumHash>>),
/// Removes block data above the given block number from the database.
///