Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 739f64a

Browse files
committed
Calculate batch byte size when pruning by size
1 parent d4a4919 commit 739f64a

File tree

5 files changed

+204
-88
lines changed

5 files changed

+204
-88
lines changed

bee-ledger/src/workers/consensus/worker.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,15 @@ where
365365
error!("Pruning milestone range failed: {}.", e);
366366
}
367367
}
368-
PruningTask::BySize(reduced_size) => {
369-
if let Err(e) =
370-
prune::prune_by_size(&tangle, &storage, &bus, reduced_size, &pruning_config)
371-
.await
368+
PruningTask::BySize(num_bytes_to_prune) => {
369+
if let Err(e) = prune::prune_by_size(
370+
&tangle,
371+
&storage,
372+
&bus,
373+
num_bytes_to_prune,
374+
&pruning_config,
375+
)
376+
.await
372377
{
373378
error!("Pruning by storage size failed: {}.", e);
374379
}

0 commit comments

Comments
 (0)