Skip to content

Commit

Permalink
dev(better_theoros): last nitpick πŸ’€
Browse files Browse the repository at this point in the history
  • Loading branch information
akhercha committed Nov 1, 2024
1 parent 2adf0e4 commit ac4907d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions rust/theoros/src/services/hyperlane/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl HyperlaneService {
"πŸŒ‰ [Hyperlane] βœ… Nonce #{} is fully signed by all validators! Storing updates...",
nonce
);
if let Err(e) = self.store_event_updates(nonce).await {
if let Err(e) = self.store_dispatch_updates(nonce).await {
tracing::error!("😱 Failed to store event updates for nonce {}: {:?}", nonce, e);
}
self.storage.unsigned_checkpoints().remove(nonce).await;
Expand Down Expand Up @@ -158,14 +158,11 @@ impl HyperlaneService {
Ok(())
}

/// Stores the event updates once it has been signed.
async fn store_event_updates(&self, nonce: u32) -> anyhow::Result<()> {
/// Stores the updates once it has been signed.
async fn store_dispatch_updates(&self, nonce: u32) -> anyhow::Result<()> {
let event = match self.storage.unsigned_checkpoints().get(nonce).await {
Some(e) => e,
None => {
tracing::error!("Event not found for nonce {}", nonce);
return Ok(());
}
None => unreachable!(),
};
for update in event.message.body.updates.iter() {
let feed_id = update.feed_id();
Expand Down

0 comments on commit ac4907d

Please sign in to comment.