Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jean-Philippe Raynaud <jp.raynaud@gmail.com>
  • Loading branch information
iquerejeta and jpraynaud committed Dec 2, 2022
1 parent a5ef0c2 commit 7fc8ee6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions mithril-stm/src/stm.rs
Expand Up @@ -556,13 +556,9 @@ impl<D: Digest + Clone + FixedOutput> StmClerk<D> {
StmAggrVerificationKey::from(&self.closed_reg)
}

/// Get the (VK, stake) of a party given it's index.
/// Get the (VK, stake) of a party given its index.
pub fn get_reg_party(&self, party_index: &Index) -> Option<(StmVerificationKey, Stake)> {
if *party_index as usize >= self.closed_reg.reg_parties.len() {
return None;
}

Some(self.closed_reg.reg_parties[*party_index as usize].into())
self.closed_reg.reg_parties.get(*party_index as usize).map(|r| r.into())
}
}

Expand Down

0 comments on commit 7fc8ee6

Please sign in to comment.