refactor(prune): segment trait, receipts impl (#4887)

This commit is contained in:
Alexey Shekhirin
2023-10-05 12:56:47 +01:00
committed by GitHub
parent 4dceabf06b
commit 1e7d028d53
43 changed files with 633 additions and 428 deletions

View File

@ -174,7 +174,7 @@ struct Metrics {
impl From<PrunerError> for EngineHookError {
fn from(err: PrunerError) -> Self {
match err {
PrunerError::PrunePart(_) | PrunerError::InconsistentData(_) => {
PrunerError::PruneSegment(_) | PrunerError::InconsistentData(_) => {
EngineHookError::Internal(Box::new(err))
}
PrunerError::Interface(err) => err.into(),

View File

@ -84,7 +84,7 @@ impl<DB: Database + 'static> SnapshotHook<DB> {
let targets = snapshotter.get_snapshot_targets(finalized_block_number)?;
// Check if the snapshotting of any parts has been requested.
// Check if the snapshotting of any data has been requested.
if targets.any() {
let (tx, rx) = oneshot::channel();
self.task_spawner.spawn_critical_blocking(