chore: move receipts pruning to provider (#13886)

This commit is contained in:
Arsenii Kulikov
2025-01-22 17:41:13 +04:00
committed by GitHub
parent cd44fc3d09
commit 23ebf96188
8 changed files with 75 additions and 250 deletions

View File

@ -874,8 +874,10 @@ mod tests {
// If there is a pruning configuration, then it's forced to use the database.
// This way we test both cases.
let modes = [None, Some(PruneModes::none())];
let random_filter =
ReceiptsLogPruneConfig(BTreeMap::from([(Address::random(), PruneMode::Full)]));
let random_filter = ReceiptsLogPruneConfig(BTreeMap::from([(
Address::random(),
PruneMode::Distance(100000),
)]));
// Tests node with database and node with static files
for mut mode in modes {
@ -1011,8 +1013,10 @@ mod tests {
// If there is a pruning configuration, then it's forced to use the database.
// This way we test both cases.
let modes = [None, Some(PruneModes::none())];
let random_filter =
ReceiptsLogPruneConfig(BTreeMap::from([(Address::random(), PruneMode::Full)]));
let random_filter = ReceiptsLogPruneConfig(BTreeMap::from([(
Address::random(),
PruneMode::Before(100000),
)]));
// Tests node with database and node with static files
for mut mode in modes {