@@ -38,14 +38,14 @@ pub enum RuntimeError {
38
38
CertificateRetriever ( #[ from] CertificateRetrieverError ) ,
39
39
40
40
/// Error raised when the digest computation fails.
41
- #[ error( "immutale digester error: '{0}'" ) ]
41
+ #[ error( "immutable digester error: '{0}'" ) ]
42
42
ImmutableDigester ( #[ from] ImmutableDigesterError ) ,
43
43
44
44
/// Error raised when the digest stored in the signed message doesn't match the
45
45
/// [certificate](https://mithril.network/mithril-common/doc/mithril_common/entities/struct.Certificate.html)
46
46
/// hash.
47
- #[ error( "digest unmatch error: '{0}'" ) ]
48
- DigestUnmatch ( String ) ,
47
+ #[ error( "digest doesn't match error: '{0}'" ) ]
48
+ DigestDoesntMatch ( String ) ,
49
49
50
50
/// Error raised when verification fails.
51
51
#[ error( "verification error: '{0}'" ) ]
@@ -66,7 +66,7 @@ pub struct Runtime {
66
66
/// Genesis verifier dependency that verifies the genesis signatures
67
67
genesis_verifier : ProtocolGenesisVerifier ,
68
68
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
70
70
digester : Option < Box < dyn ImmutableDigester > > ,
71
71
}
72
72
@@ -167,7 +167,7 @@ impl Runtime {
167
167
unpacked_snapshot_digest. clone ( ) ,
168
168
) ;
169
169
if protocol_message. compute_hash ( ) != certificate. signed_message {
170
- return Err ( RuntimeError :: DigestUnmatch ( unpacked_snapshot_digest) ) ;
170
+ return Err ( RuntimeError :: DigestDoesntMatch ( unpacked_snapshot_digest) ) ;
171
171
}
172
172
self . certificate_verifier
173
173
. verify_certificate_chain (
@@ -631,7 +631,7 @@ mod tests {
631
631
#[ tokio:: test]
632
632
async fn test_restore_snapshot_ko_restore_unpack_snapshot ( ) {
633
633
let digest = "digest123" ;
634
- let certificate_hash = "certhash123 " ;
634
+ let certificate_hash = "cert_hash123 " ;
635
635
let fake_certificate = fake_data:: certificate ( certificate_hash. to_string ( ) ) ;
636
636
let fake_snapshot = fake_data:: snapshots ( 1 ) . first ( ) . unwrap ( ) . to_owned ( ) ;
637
637
let ( mut mock_aggregator_handler, mut mock_verifier, _mock_digester, genesis_verifier) =
0 commit comments