mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: remove prune_modes from BlockWriter (#9231)
This commit is contained in:
@ -109,7 +109,10 @@ impl EnvironmentArgs {
|
||||
static_file_provider: StaticFileProvider,
|
||||
) -> eyre::Result<ProviderFactory<Arc<DatabaseEnv>>> {
|
||||
let has_receipt_pruning = config.prune.as_ref().map_or(false, |a| a.has_receipts_pruning());
|
||||
let factory = ProviderFactory::new(db, self.chain.clone(), static_file_provider);
|
||||
let prune_modes =
|
||||
config.prune.as_ref().map(|prune| prune.segments.clone()).unwrap_or_default();
|
||||
let factory = ProviderFactory::new(db, self.chain.clone(), static_file_provider)
|
||||
.with_prune_modes(prune_modes.clone());
|
||||
|
||||
info!(target: "reth::cli", "Verifying storage consistency.");
|
||||
|
||||
@ -123,8 +126,6 @@ impl EnvironmentArgs {
|
||||
return Ok(factory)
|
||||
}
|
||||
|
||||
let prune_modes = config.prune.clone().map(|prune| prune.segments).unwrap_or_default();
|
||||
|
||||
// Highly unlikely to happen, and given its destructive nature, it's better to panic
|
||||
// instead.
|
||||
assert_ne!(unwind_target, PipelineTarget::Unwind(0), "A static file <> database inconsistency was found that would trigger an unwind to block 0");
|
||||
|
||||
Reference in New Issue
Block a user