Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nambrot committed Oct 6, 2023
1 parent 032d942 commit f776d4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
8 changes: 6 additions & 2 deletions rust/agents/validator/src/submit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down
15 changes: 4 additions & 11 deletions rust/agents/validator/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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<Instrumented<JoinHandle<Result<()>>>> {
Expand Down

0 comments on commit f776d4b

Please sign in to comment.