#6853 Adding store tests for data column pruning (#7228)

#6853 Update store tests to cover data column pruning


  Created a helper function `check_data_column_existence` which is a copy of `check_blob_existence` but checking data columns instead.
The helper function is then used to check whether data columns are also pruned when blobs are pruned if PeerDAS is enabled.


Co-Authored-By: SunnysidedJ <j@testinprod.io>

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
SunnysidedJ
2025-10-16 16:20:26 +01:00
committed by GitHub
parent 73e75e3e69
commit d1e06dc40d
3 changed files with 468 additions and 20 deletions

View File

@@ -282,7 +282,8 @@ impl<E: EthSpec> LevelDB<E> {
) -> Result<(), Error> {
let mut leveldb_batch = Writebatch::new();
let iter = self.db.iter(self.read_options());
let start_key = BytesKey::from_vec(column.as_bytes().to_vec());
iter.seek(&start_key);
iter.take_while(move |(key, _)| key.matches_column(column))
.for_each(|(key, value)| {
if f(&value).unwrap_or(false) {