fix count

This commit is contained in:
Yong Kang
2025-10-10 10:55:40 +00:00
parent 2808ce0260
commit 77e1b1cc46

View File

@@ -499,7 +499,7 @@ impl TreeConfig {
/// Setter for the number of storage proof worker threads.
pub const fn with_storage_worker_count(mut self, storage_worker_count: usize) -> Self {
self.storage_worker_count = if storage_worker_count > MIN_WORKER_COUNT {
self.storage_worker_count = if storage_worker_count >= MIN_WORKER_COUNT {
storage_worker_count
} else {
MIN_WORKER_COUNT
@@ -514,7 +514,7 @@ impl TreeConfig {
/// Setter for the number of account proof worker threads.
pub const fn with_account_worker_count(mut self, account_worker_count: usize) -> Self {
self.account_worker_count = if account_worker_count > MIN_WORKER_COUNT {
self.account_worker_count = if account_worker_count >= MIN_WORKER_COUNT {
account_worker_count
} else {
MIN_WORKER_COUNT