Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove WriteTransactions from PersistenceAction #10241

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions crates/engine/tree/src/persistence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
use reth_chain_state::ExecutedBlock;
use reth_db::Database;
use reth_errors::ProviderError;
use reth_primitives::{SealedBlock, B256};
use reth_primitives::B256;
use reth_provider::{writer::UnifiedStorageWriter, ProviderFactory, StaticFileProviderFactory};
use reth_prune::{Pruner, PrunerError, PrunerOutput};
use std::sync::{
mpsc::{Receiver, SendError, Sender},
Arc,
};
use std::sync::mpsc::{Receiver, SendError, Sender};
use thiserror::Error;
use tokio::sync::oneshot;
use tracing::{debug, error};
Expand Down Expand Up @@ -95,15 +92,6 @@ where
// we ignore the error because the caller may or may not care about the result
let _ = sender.send(res);
}
PersistenceAction::WriteTransactions(_block, _sender) => {
unimplemented!()
// let (block_num, td) =
// self.write_transactions(block).expect("todo: handle errors");
// self.update_transaction_meta(block_num, td).expect("todo: handle errors");

// // we ignore the error because the caller may or may not care about the
// result let _ = sender.send(());
}
}
}
Ok(())
Expand Down Expand Up @@ -132,13 +120,6 @@ pub enum PersistenceAction {
/// Then the execution history-related data will be written to the database.
SaveBlocks(Vec<ExecutedBlock>, oneshot::Sender<Option<B256>>),

/// The given block has been added to the canonical chain, its transactions and headers will be
/// persisted for durability.
///
/// This will first append the header and transactions to static files, then update the
/// checkpoints for headers and block bodies in the database.
WriteTransactions(Arc<SealedBlock>, oneshot::Sender<()>),

/// Removes block data above the given block number from the database.
///
/// This will first update checkpoints from the database, then remove actual block data from
Expand Down
Loading