From 1ee86805cd9a0077fe44e411004e1104e548557e Mon Sep 17 00:00:00 2001 From: djordon Date: Tue, 24 Dec 2024 14:23:21 -0500 Subject: [PATCH] update the test --- src/state_machine/coordinator/mod.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/state_machine/coordinator/mod.rs b/src/state_machine/coordinator/mod.rs index 8d6bdfb..2e42a8a 100644 --- a/src/state_machine/coordinator/mod.rs +++ b/src/state_machine/coordinator/mod.rs @@ -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,