mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
dkg-evrf crate
monero-oxide relies on ciphersuite, which is in-tree, yet we've made breaking changes since. This commit adds a patch so monero-oxide -> patches/ciphersuite -> crypto/ciphersuite, with patches/ciphersuite resolving the breaking changes.
This commit is contained in:
@@ -39,6 +39,19 @@ impl Participant {
|
||||
pub const fn to_bytes(&self) -> [u8; 2] {
|
||||
self.0.to_le_bytes()
|
||||
}
|
||||
|
||||
/// Create an iterator over participant indexes.
|
||||
pub fn iter() -> impl Iterator<Item = Participant> {
|
||||
struct ParticipantIterator(u16);
|
||||
impl Iterator for ParticipantIterator {
|
||||
type Item = Participant;
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
self.0 = self.0.checked_add(1)?;
|
||||
Some(Participant(self.0))
|
||||
}
|
||||
}
|
||||
ParticipantIterator(0)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Participant> for u16 {
|
||||
|
||||
Reference in New Issue
Block a user