From d5d0fb5f065812973fafec8afe33aff215bfe5f0 Mon Sep 17 00:00:00 2001 From: FiveMovesAhead Date: Wed, 26 Nov 2025 16:37:35 +0000 Subject: [PATCH] Handle sampling edge case where there is only solutions. --- tig-protocol/src/contracts/benchmarks.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tig-protocol/src/contracts/benchmarks.rs b/tig-protocol/src/contracts/benchmarks.rs index 8c06092f..0458809c 100644 --- a/tig-protocol/src/contracts/benchmarks.rs +++ b/tig-protocol/src/contracts/benchmarks.rs @@ -264,6 +264,9 @@ pub async fn submit_benchmark( } } }; + if end == 0 { + continue; + } let idx = rng.gen_range(0..end); lt_average_samples.insert(bundle[idx].0 as u64); }