diff --git a/frost-core/src/frost/identifier.rs b/frost-core/src/frost/identifier.rs index 9ff2bdd..961baf3 100644 --- a/frost-core/src/frost/identifier.rs +++ b/frost-core/src/frost/identifier.rs @@ -134,14 +134,7 @@ where C: Ciphersuite, { fn partial_cmp(&self, other: &Self) -> Option { - let serialized_self = <::Field>::little_endian_serialize(&self.0); - let serialized_other = <::Field>::little_endian_serialize(&other.0); - // The default cmp uses lexicographic order; so we need the elements in big endian - serialized_self - .as_ref() - .iter() - .rev() - .partial_cmp(serialized_other.as_ref().iter().rev()) + Some(self.cmp(other)) } } diff --git a/frost-core/src/tests/ciphersuite_generic.rs b/frost-core/src/tests/ciphersuite_generic.rs index 98ef8c7..6dff6fe 100644 --- a/frost-core/src/tests/ciphersuite_generic.rs +++ b/frost-core/src/tests/ciphersuite_generic.rs @@ -405,7 +405,7 @@ where .expect("should be nonzero"); received_round1_packages .entry(receiver_participant_identifier) - .or_insert_with(BTreeMap::new) + .or_default() .insert(participant_identifier, round1_package.clone()); } }