Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
fix: remove storage request for handling echo and ready
Browse files Browse the repository at this point in the history
  • Loading branch information
gruberb committed Apr 17, 2024
1 parent fa28963 commit 5586bc8
Showing 1 changed file with 16 additions and 40 deletions.
56 changes: 16 additions & 40 deletions crates/topos-tce-broadcast/src/double_echo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,26 +233,14 @@ impl DoubleEcho {
validator_id: ValidatorId,
signature: Signature,
) {
match self.validator_store.get_certificate(&certificate_id) {
Err(storage_error) => error!(
"Unable to get the Certificate {} due to {:?}",
&certificate_id, storage_error
),
Ok(Some(_)) => debug!(
"Certificate {} already delivered, ignoring echo",
&certificate_id
),
Ok(None) => {
let _ = self
.task_manager_message_sender
.send(DoubleEchoCommand::Echo {
validator_id,
certificate_id,
signature,
})
.await;
}
}
let _ = self
.task_manager_message_sender
.send(DoubleEchoCommand::Echo {
validator_id,
certificate_id,
signature,
})
.await;
}

pub async fn handle_ready(
Expand All @@ -261,25 +249,13 @@ impl DoubleEcho {
validator_id: ValidatorId,
signature: Signature,
) {
match self.validator_store.get_certificate(&certificate_id) {
Err(storage_error) => error!(
"Unable to get the Certificate {} due to {:?}",
&certificate_id, storage_error
),
Ok(Some(_)) => debug!(
"Certificate {} already delivered, ignoring echo",
&certificate_id
),
Ok(None) => {
let _ = self
.task_manager_message_sender
.send(DoubleEchoCommand::Ready {
validator_id,
certificate_id,
signature,
})
.await;
}
}
let _ = self
.task_manager_message_sender
.send(DoubleEchoCommand::Ready {
validator_id,
certificate_id,
signature,
})
.await;
}
}

0 comments on commit 5586bc8

Please sign in to comment.