From 1121849ed7213a76e62c6855ec82c28ae76c1bb9 Mon Sep 17 00:00:00 2001 From: DJO <790521+Alenar@users.noreply.github.com> Date: Mon, 30 May 2022 18:34:16 +0200 Subject: [PATCH] Aggregator signs real digest Signed-off-by: DJO <790521+Alenar@users.noreply.github.com> --- mithril-aggregator/src/multi_signer.rs | 4 ++-- mithril-aggregator/src/runtime.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mithril-aggregator/src/multi_signer.rs b/mithril-aggregator/src/multi_signer.rs index dcffe59de8a..2e40937ca43 100644 --- a/mithril-aggregator/src/multi_signer.rs +++ b/mithril-aggregator/src/multi_signer.rs @@ -324,11 +324,11 @@ impl MultiSigner for MultiSignerImpl { /// Creates a multi signature from single signatures fn create_multi_signature(&mut self) -> Result, ProtocolError> { - debug!("Create multi signature"); - let message = &self .get_current_message() .ok_or_else(ProtocolError::UnavailableMessage)?; + + debug!("Create multi signature"; "message" => ?message); let signatures: Vec = self .single_signatures .iter() diff --git a/mithril-aggregator/src/runtime.rs b/mithril-aggregator/src/runtime.rs index 01ff8912470..7bc1285d57b 100644 --- a/mithril-aggregator/src/runtime.rs +++ b/mithril-aggregator/src/runtime.rs @@ -122,9 +122,9 @@ impl AggregatorRuntime { Ok(digest_result) => { let mut beacon = fake_data::beacon(); beacon.immutable_file_number = digest_result.last_immutable_file_number; - let message = fake_data::digest(&beacon); + let message = &digest_result.digest.clone().into_bytes(); - match self.manage_trigger_snapshot(&message, &beacon).await { + match self.manage_trigger_snapshot(message, &beacon).await { Ok(true) => { let snapshot_name = format!("{}.{}.tar.gz", self.network, &digest_result.digest);