Skip to content

Commit

Permalink
update the test
Browse files Browse the repository at this point in the history
  • Loading branch information
djordon committed Dec 24, 2024
1 parent b86fad3 commit 1ee8680
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/state_machine/coordinator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,19 +1117,23 @@ pub mod test {
}
}

assert_eq!(outbound_messages.len(), 1);
let messages = outbound_messages.clone();
let result = feedback_messages_with_errors(&mut coordinators, &mut signers, &messages);
assert!(result.is_ok());

// add NonceResponses so there's more than the number of signers
let mut packet = outbound_messages[0].clone();
if let Message::SignatureShareRequest(ref mut request) = packet.msg {
for _ in 0..1000 {
request
.nonce_responses
.push(request.nonce_responses.first().unwrap().clone());
}
request
.nonce_responses
.push(request.nonce_responses[0].clone());
} else {
panic!("failed to match message");
}

// Send the SignatureShareRequest message to all signers and share their responses with the coordinator and signers
// Send the SignatureShareRequest message to all signers and share
// their responses with the coordinator and signers
let result = feedback_messages_with_errors(&mut coordinators, &mut signers, &[packet]);
if !matches!(
result,
Expand Down

0 comments on commit 1ee8680

Please sign in to comment.