Skip to content

Commit a13ef68

Browse files
committed
Fix some typos
1 parent 8f23b85 commit a13ef68

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

mithril-client/src/aggregator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub enum AggregatorHandlerError {
3636
#[error("json parsing failed: '{0}'")]
3737
JsonParseFailed(String),
3838

39-
/// Error raised when an IO error occured (ie: snapshot writting on disk fails).
39+
/// Error raised when an IO error occured (ie: snapshot writing on disk fails).
4040
#[error("io error: {0}")]
4141
IOError(#[from] io::Error),
4242

mithril-client/src/runtime.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ pub enum RuntimeError {
3838
CertificateRetriever(#[from] CertificateRetrieverError),
3939

4040
/// Error raised when the digest computation fails.
41-
#[error("immutale digester error: '{0}'")]
41+
#[error("immutable digester error: '{0}'")]
4242
ImmutableDigester(#[from] ImmutableDigesterError),
4343

4444
/// Error raised when the digest stored in the signed message doesn't match the
4545
/// [certificate](https://mithril.network/mithril-common/doc/mithril_common/entities/struct.Certificate.html)
4646
/// hash.
47-
#[error("digest unmatch error: '{0}'")]
48-
DigestUnmatch(String),
47+
#[error("digest doesn't match error: '{0}'")]
48+
DigestDoesntMatch(String),
4949

5050
/// Error raised when verification fails.
5151
#[error("verification error: '{0}'")]
@@ -66,7 +66,7 @@ pub struct Runtime {
6666
/// Genesis verifier dependency that verifies the genesis signatures
6767
genesis_verifier: ProtocolGenesisVerifier,
6868

69-
/// Digester dependency that computes the digest used as the message ot be signed and embedded in the multisignature
69+
/// Digester dependency that computes the digest used as the message ot be signed and embedded in the multi-signature
7070
digester: Option<Box<dyn ImmutableDigester>>,
7171
}
7272

@@ -167,7 +167,7 @@ impl Runtime {
167167
unpacked_snapshot_digest.clone(),
168168
);
169169
if protocol_message.compute_hash() != certificate.signed_message {
170-
return Err(RuntimeError::DigestUnmatch(unpacked_snapshot_digest));
170+
return Err(RuntimeError::DigestDoesntMatch(unpacked_snapshot_digest));
171171
}
172172
self.certificate_verifier
173173
.verify_certificate_chain(
@@ -631,7 +631,7 @@ mod tests {
631631
#[tokio::test]
632632
async fn test_restore_snapshot_ko_restore_unpack_snapshot() {
633633
let digest = "digest123";
634-
let certificate_hash = "certhash123";
634+
let certificate_hash = "cert_hash123";
635635
let fake_certificate = fake_data::certificate(certificate_hash.to_string());
636636
let fake_snapshot = fake_data::snapshots(1).first().unwrap().to_owned();
637637
let (mut mock_aggregator_handler, mut mock_verifier, _mock_digester, genesis_verifier) =

0 commit comments

Comments
 (0)