Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix identifier for sending round2 #47

Merged
merged 2 commits into from
Nov 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/node/protocol/dkg/round_two.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ impl Package {
);
return Err("Members and round2 packages length mismatch".into());
}

// Collect all the futures into a Vec
let send_futures: Vec<_> = members
.into_iter()
.zip(round2_packages.iter())
.map(|((member_id, reliable_sender), (_, package))| {
.map(|(member_id, reliable_sender)| {
let identifier = frost::Identifier::derive(member_id.as_bytes()).unwrap();
let package = round2_packages.get(&identifier).unwrap();
let message = PackageMessage::new(self.sender_id.clone(), Some(package.clone()));
let message = Message::Unicast(Unicast::DKGRoundTwoPackage(message));
log::debug!("Queueing send to member: {:?}", member_id);
Expand Down Expand Up @@ -336,7 +338,7 @@ mod round_two_tests {
let mut mock = ReliableSenderHandle::default();
mock.expect_clone().returning(ReliableSenderHandle::default);
mock.expect_send()
//.times(1)
// .times(1)
.return_once(|_| futures::future::err("Some error".into()).boxed());
mock
});
Expand Down
Loading