Skip to content

Commit f0add53

Browse files
fix: change work_item_batch_size type from usize to u64 (#2379)
* fix: change work_item_batch_size type from usize to u64 in CLI and config * fix lint
1 parent 0687860 commit f0add53

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

forester/src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,10 @@ pub struct StartArgs {
306306
#[arg(
307307
long,
308308
env = "WORK_ITEM_BATCH_SIZE",
309-
value_parser = clap::value_parser!(usize).range(1..),
309+
value_parser = clap::value_parser!(u64).range(1..),
310310
help = "Number of queue items to process per batch cycle. Smaller values reduce blockhash expiry risk, larger values reduce per-batch overhead."
311311
)]
312-
pub work_item_batch_size: Option<usize>,
312+
pub work_item_batch_size: Option<u64>,
313313

314314
#[arg(
315315
long,

forester/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ impl ForesterConfig {
431431
.transpose()?,
432432
min_queue_items: args.min_queue_items,
433433
enable_v1_multi_nullify: args.enable_v1_multi_nullify,
434-
work_item_batch_size: args.work_item_batch_size.unwrap_or(50).max(1),
434+
work_item_batch_size: args.work_item_batch_size.unwrap_or(50) as usize,
435435
})
436436
}
437437

scripts/lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cargo clippy --workspace --all-features --all-targets -- -D warnings
2020
# Check that READMEs are up-to-date with cargo-rdme
2121
echo "Checking READMEs are up-to-date..."
2222
if ! command -v cargo-rdme &> /dev/null; then
23-
cargo install cargo-rdme
23+
cargo install --locked cargo-rdme
2424
fi
2525
for toml in $(find program-libs sdk-libs -name '.cargo-rdme.toml' -type f); do
2626
crate_dir=$(dirname "$toml")

0 commit comments

Comments
 (0)