Skip to content

Commit

Permalink
Simplify the filters by using nested iterators (#4526)
Browse files Browse the repository at this point in the history
* simplify filters

* Use debug for logs

* fix errors

* clippy

* new method using iterators

* clippy

* use drop for logging

* clippy
  • Loading branch information
DaughterOfMars authored Dec 19, 2024
1 parent f3a439d commit 8a750b4
Show file tree
Hide file tree
Showing 4 changed files with 191 additions and 288 deletions.
1 change: 0 additions & 1 deletion crates/iota-e2e-tests/tests/full_node_migration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ fn genesis_builder_snapshot_generation(
snapshot_parser.target_milestone_timestamp(),
snapshot_parser.outputs(),
object_snapshot_writer,
false, // with metrics
)?;

Ok(())
Expand Down
1 change: 0 additions & 1 deletion crates/iota-genesis-builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ fn main() -> Result<()> {
snapshot_parser.target_milestone_timestamp(),
snapshot_parser.outputs(),
object_snapshot_writer,
true, // with metrics
)?;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,9 @@ impl Migration {
target_milestone_timestamp: u32,
outputs: impl Iterator<Item = Result<(OutputHeader, Output)>> + 'a,
writer: impl Write,
with_metrics: bool,
) -> Result<()> {
itertools::process_results(
process_outputs_for_iota(target_milestone_timestamp, outputs, with_metrics),
process_outputs_for_iota(target_milestone_timestamp, outputs),
|outputs| self.run(outputs, writer),
)?
}
Expand Down
Loading

0 comments on commit 8a750b4

Please sign in to comment.