From e4d25d29eefaf8581e5e10691a36cd146fdea945 Mon Sep 17 00:00:00 2001 From: Philipp_DE <26351148+ItzN00bPvP@users.noreply.github.com> Date: Sat, 1 Apr 2023 23:57:20 +0200 Subject: [PATCH] fix: include all state ids loop doesn't include max_state_id because the upperbound is exclusive loop also doesnt work where min_state_id = max_state_id --- src/api/blocks.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/blocks.rs b/src/api/blocks.rs index ace1e2f..acb8713 100644 --- a/src/api/blocks.rs +++ b/src/api/blocks.rs @@ -30,7 +30,7 @@ impl Blocks { blocks.iter().for_each(|b| { let min_state_id = b.min_state_id.unwrap_or(b.id << 4); let max_state_id = b.max_state_id.unwrap_or(min_state_id + 15); - (min_state_id..max_state_id).for_each(|s| { + (min_state_id..=max_state_id).for_each(|s| { blocks_map.insert(s, b.clone()); }); });