Skip to content

Commit

Permalink
Fix output and update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
paberr committed Nov 11, 2023
1 parent b562478 commit 87bf541
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 13 additions & 9 deletions src/bin/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,19 @@ impl Control {
let chunk_ids = ceremony
.setups
.iter_mut()
.map(|setup| {
setup.chunks.iter_mut().filter_map(|c| {
if participant_id.is_none() || c.lock_holder == participant_id {
c.lock_holder = None;
Some(c.unique_chunk_id.clone())
} else {
None
}
})
.flat_map(|setup| {
setup
.chunks
.iter_mut()
.filter_map(|c| {
if participant_id.is_none() || c.lock_holder == participant_id {
c.lock_holder = None;
Some(c.unique_chunk_id.clone())
} else {
None
}
})
.collect::<Vec<_>>()
})
.collect::<Vec<_>>();
info!("chunk IDs unlocked: {:?}", chunk_ids);
Expand Down

0 comments on commit 87bf541

Please sign in to comment.