We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ceb186 commit e3551a8Copy full SHA for e3551a8
mithril-common/src/entities/certificate_metadata.rs
@@ -57,8 +57,18 @@ impl CertificateMetadata {
57
let mut hasher = Sha256::new();
58
hasher.update(self.protocol_version.as_bytes());
59
hasher.update(self.protocol_parameters.compute_hash().as_bytes());
60
- hasher.update(self.initiated_at.timestamp_nanos().to_be_bytes());
61
- hasher.update(self.sealed_at.timestamp_nanos().to_be_bytes());
+ hasher.update(
+ self.initiated_at
62
+ .timestamp_nanos_opt()
63
+ .unwrap_or_default()
64
+ .to_be_bytes(),
65
+ );
66
67
+ self.sealed_at
68
69
70
71
72
self.signers
73
.iter()
74
.for_each(|signer| hasher.update(signer.compute_hash().as_bytes()));
0 commit comments