Skip to content

Commit 474aa4e

Browse files
committed
fix spelling
1 parent e27d8d1 commit 474aa4e

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.config/dictionaries/project.dic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ CBOR
2929
cbork
3030
cdylib
3131
CEST
32+
chacha
3233
CHAINCODE
3334
chainsync
3435
childs

rust/catalyst-voting/src/crypto/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! Crypto primitives which are used by voting protocol.
22
3+
// cspell: words Seedable
4+
35
use rand_chacha::ChaCha8Rng;
46
use rand_core::{CryptoRngCore, SeedableRng};
57

rust/catalyst-voting/src/txs/v1/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub struct Tx {
7777
}
7878

7979
/// Vote payload struct.
80-
/// Contains all necesarry information for the valid vote.
80+
/// Contains all necessary information for the valid vote.
8181
#[derive(Debug, Clone, PartialEq, Eq)]
8282
pub enum VotePayload {
8383
/// Public voting choice

rust/catalyst-voting/src/vote_protocol/voter/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub fn encrypt_vote_with_default_rng(
120120
/// If not valid encrypted vote is provided, unexpected results may occur.
121121
///
122122
/// # Errors
123-
/// - Ivalid encrypted vote, not a valid unit vector.
123+
/// - Invalid encrypted vote, not a valid unit vector.
124124
pub fn decrypt_vote(vote: &EncryptedVote, secret_key: &ElectionSecretKey) -> anyhow::Result<Vote> {
125125
// Assuming that the provided encrypted vote is a correctly encoded unit vector,
126126
// the maximum log value is `1`.
@@ -130,15 +130,15 @@ pub fn decrypt_vote(vote: &EncryptedVote, secret_key: &ElectionSecretKey) -> any
130130
let decrypted_choice_per_option = decrypt(encrypted_choice_per_option, &secret_key.0);
131131
let choice_per_option = setup
132132
.discrete_log(decrypted_choice_per_option)
133-
.map_err(|_| anyhow!("Ivalid encrypted vote, not a valid unit vector."))?;
133+
.map_err(|_| anyhow!("Invalid encrypted vote, not a valid unit vector."))?;
134134
if choice_per_option == 1 {
135135
return Ok(Vote {
136136
choice: i,
137137
voting_options: vote.0.len(),
138138
});
139139
}
140140
}
141-
bail!("Ivalid encrypted vote, not a valid unit vector.")
141+
bail!("Invalid encrypted vote, not a valid unit vector.")
142142
}
143143

144144
#[cfg(test)]

0 commit comments

Comments
 (0)