diff --git a/crates/sui-benchmark/src/workloads/workload.rs b/crates/sui-benchmark/src/workloads/workload.rs index 9d9f766f48157..739da005849be 100644 --- a/crates/sui-benchmark/src/workloads/workload.rs +++ b/crates/sui-benchmark/src/workloads/workload.rs @@ -47,7 +47,7 @@ impl TryFrom for ExpectedFailureType { match value { 0 => { let mut rng = rand::thread_rng(); - let n = rng.gen_range(0..ExpectedFailureType::COUNT - 1); + let n = rng.gen_range(1..ExpectedFailureType::COUNT - 1); Ok(ExpectedFailureType::iter().nth(n).unwrap()) } _ => ExpectedFailureType::iter()