feat(engine): add CLI args for sparse trie pruning configuration (#21703)

This commit is contained in:
Alexey Shekhirin
2026-02-02 12:52:31 +00:00
committed by GitHub
parent 4280ccf470
commit 1592e51d34
4 changed files with 81 additions and 22 deletions

View File

@@ -528,8 +528,12 @@ impl TreeConfig {
}
/// Setter for the number of storage proof worker threads.
pub fn with_storage_worker_count(mut self, storage_worker_count: usize) -> Self {
self.storage_worker_count = storage_worker_count.max(MIN_WORKER_COUNT);
///
/// No-op if it's [`None`].
pub fn with_storage_worker_count_opt(mut self, storage_worker_count: Option<usize>) -> Self {
if let Some(count) = storage_worker_count {
self.storage_worker_count = count.max(MIN_WORKER_COUNT);
}
self
}
@@ -539,8 +543,12 @@ impl TreeConfig {
}
/// Setter for the number of account proof worker threads.
pub fn with_account_worker_count(mut self, account_worker_count: usize) -> Self {
self.account_worker_count = account_worker_count.max(MIN_WORKER_COUNT);
///
/// No-op if it's [`None`].
pub fn with_account_worker_count_opt(mut self, account_worker_count: Option<usize>) -> Self {
if let Some(count) = account_worker_count {
self.account_worker_count = count.max(MIN_WORKER_COUNT);
}
self
}