Skip to content

Commit

Permalink
remove extraneous assert; fix boolean cache name; use short name when…
Browse files Browse the repository at this point in the history
… logging vars
  • Loading branch information
xoloki committed Jan 14, 2025
1 parent 1ee8680 commit f31898d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/state_machine/coordinator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,6 @@ 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());
Expand Down
6 changes: 3 additions & 3 deletions src/state_machine/signer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,16 +573,16 @@ impl<SignerType: SignerTrait> Signer<SignerType> {
// increment by one until self.total_signers - 1. So the checks
// here should be sufficient for catching empty signer ID sets,
// duplicate signer IDs, or unknown signer IDs.
let is_valid_request = sign_request.nonce_responses.len() != signer_id_set.len()
let is_invalid_request = sign_request.nonce_responses.len() != signer_id_set.len()
|| signer_id_set.is_empty()
|| signer_id_set.last() >= Some(&self.total_signers);

if is_valid_request {
if is_invalid_request {
warn!("received an invalid SignatureShareRequest");
return Err(Error::InvalidNonceResponse);
}

debug!(%self.signer_id, "received a valid SignatureShareRequest");
debug!(signer_id = %self.signer_id, "received a valid SignatureShareRequest");

if signer_id_set.contains(&self.signer_id) {
let key_ids: Vec<u32> = sign_request
Expand Down

0 comments on commit f31898d

Please sign in to comment.