From f175f6ec9f6ee208d7825296e4a81e8486287f3e Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Thu, 25 Jul 2024 19:21:49 +0200 Subject: [PATCH] fix(cli): set receipts pruning for chain without deposit contract (#9782) --- crates/node/core/src/args/pruning.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/node/core/src/args/pruning.rs b/crates/node/core/src/args/pruning.rs index 1621f2d8ed..620ae3e805 100644 --- a/crates/node/core/src/args/pruning.rs +++ b/crates/node/core/src/args/pruning.rs @@ -21,15 +21,18 @@ impl PruningArgs { if !self.full { return None } + Some(PruneConfig { block_interval: 5, segments: PruneModes { sender_recovery: Some(PruneMode::Full), transaction_lookup: None, + // prune all receipts if chain doesn't have deposit contract specified in chain spec receipts: chain_spec .deposit_contract .as_ref() - .map(|contract| PruneMode::Before(contract.block)), + .map(|contract| PruneMode::Before(contract.block)) + .or(Some(PruneMode::Full)), account_history: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)), storage_history: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)), receipts_log_filter: ReceiptsLogPruneConfig(