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

Commit 5586bc8

Browse files
committed
fix: remove storage request for handling echo and ready
1 parent fa28963 commit 5586bc8

File tree

1 file changed

+16
-40
lines changed
  • crates/topos-tce-broadcast/src/double_echo

1 file changed

+16
-40
lines changed

crates/topos-tce-broadcast/src/double_echo/mod.rs

+16-40
Original file line numberDiff line numberDiff line change
@@ -233,26 +233,14 @@ impl DoubleEcho {
233233
validator_id: ValidatorId,
234234
signature: Signature,
235235
) {
236-
match self.validator_store.get_certificate(&certificate_id) {
237-
Err(storage_error) => error!(
238-
"Unable to get the Certificate {} due to {:?}",
239-
&certificate_id, storage_error
240-
),
241-
Ok(Some(_)) => debug!(
242-
"Certificate {} already delivered, ignoring echo",
243-
&certificate_id
244-
),
245-
Ok(None) => {
246-
let _ = self
247-
.task_manager_message_sender
248-
.send(DoubleEchoCommand::Echo {
249-
validator_id,
250-
certificate_id,
251-
signature,
252-
})
253-
.await;
254-
}
255-
}
236+
let _ = self
237+
.task_manager_message_sender
238+
.send(DoubleEchoCommand::Echo {
239+
validator_id,
240+
certificate_id,
241+
signature,
242+
})
243+
.await;
256244
}
257245

258246
pub async fn handle_ready(
@@ -261,25 +249,13 @@ impl DoubleEcho {
261249
validator_id: ValidatorId,
262250
signature: Signature,
263251
) {
264-
match self.validator_store.get_certificate(&certificate_id) {
265-
Err(storage_error) => error!(
266-
"Unable to get the Certificate {} due to {:?}",
267-
&certificate_id, storage_error
268-
),
269-
Ok(Some(_)) => debug!(
270-
"Certificate {} already delivered, ignoring echo",
271-
&certificate_id
272-
),
273-
Ok(None) => {
274-
let _ = self
275-
.task_manager_message_sender
276-
.send(DoubleEchoCommand::Ready {
277-
validator_id,
278-
certificate_id,
279-
signature,
280-
})
281-
.await;
282-
}
283-
}
252+
let _ = self
253+
.task_manager_message_sender
254+
.send(DoubleEchoCommand::Ready {
255+
validator_id,
256+
certificate_id,
257+
signature,
258+
})
259+
.await;
284260
}
285261
}

0 commit comments

Comments
 (0)