diff --git a/ledger/src/lib.rs b/ledger/src/lib.rs index 224388db7f..3cf8a456fe 100644 --- a/ledger/src/lib.rs +++ b/ledger/src/lib.rs @@ -320,9 +320,8 @@ impl> Ledger { } // Collect the addresses of the solutions submitted in the current epoch. - let existing_epoch_blocks: Vec<_> = (start..=current_block_height).collect(); - let solution_addresses = cfg_iter!(existing_epoch_blocks) - .flat_map(|height| match self.get_solutions(*height).as_deref() { + let solution_addresses = cfg_into_iter!(start..=current_block_height) + .flat_map(|height| match self.get_solutions(height).as_deref() { Ok(Some(solutions)) => solutions.iter().map(|(_, s)| s.address()).collect::>(), _ => vec![], })