diff --git a/rust/agents/validator/src/submit.rs b/rust/agents/validator/src/submit.rs index d94f8307d97..6977555afc6 100644 --- a/rust/agents/validator/src/submit.rs +++ b/rust/agents/validator/src/submit.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use std::time::{Duration, Instant}; use std::vec; -use eyre::{Result, bail}; +use eyre::{bail, Result}; use hyperlane_core::MerkleTreeHook; use prometheus::IntGauge; use tokio::time::sleep; @@ -88,7 +88,11 @@ impl ValidatorSubmitter { .message_db .retrieve_merkle_tree_insertion_by_leaf_index(&(tree.count() as u32))? { - debug!(index = insertion.index(), queue_length = checkpoint_queue.len(), "Ingesting leaf to tree"); + debug!( + index = insertion.index(), + queue_length = checkpoint_queue.len(), + "Ingesting leaf to tree" + ); let message_id = insertion.message_id(); tree.ingest(message_id); diff --git a/rust/agents/validator/src/validator.rs b/rust/agents/validator/src/validator.rs index 2aac19de014..6f52b30e062 100644 --- a/rust/agents/validator/src/validator.rs +++ b/rust/agents/validator/src/validator.rs @@ -12,7 +12,7 @@ use hyperlane_base::{ use hyperlane_core::{ accumulator::incremental::IncrementalMerkle, Announcement, ChainResult, HyperlaneChain, HyperlaneContract, HyperlaneDomain, HyperlaneSigner, HyperlaneSignerExt, Mailbox, - TxOutcome, ValidatorAnnounce, H256, U256, MerkleTreeInsertion, MerkleTreeHook, + MerkleTreeHook, MerkleTreeInsertion, TxOutcome, ValidatorAnnounce, H256, U256, }; use hyperlane_ethereum::{SingletonSigner, SingletonSignerHandle}; use tokio::{task::JoinHandle, time::sleep}; @@ -151,16 +151,9 @@ impl Validator { let index_settings = self.as_ref().settings.chains[self.origin_chain.name()].index_settings(); let contract_sync = self.merkle_tree_hook_sync.clone(); - let cursor = contract_sync - .rate_limited_cursor(index_settings) - .await; - tokio::spawn(async move { - contract_sync - .clone() - .sync("merkle_tree_hook", cursor) - .await - }) - .instrument(info_span!("MerkleTreeHookSyncer")) + let cursor = contract_sync.rate_limited_cursor(index_settings).await; + tokio::spawn(async move { contract_sync.clone().sync("merkle_tree_hook", cursor).await }) + .instrument(info_span!("MerkleTreeHookSyncer")) } async fn run_checkpoint_submitters(&self) -> Vec>>> {