From e5328d3105968d8572adf9145669c9cfbf863de1 Mon Sep 17 00:00:00 2001 From: James Prestwich <10149425+prestwich@users.noreply.github.com> Date: Tue, 31 Aug 2021 13:39:32 -0700 Subject: [PATCH] bug: remove ancient debug rate limiter in prover_sync (#686) --- rust/agents/processor/src/prover_sync.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/rust/agents/processor/src/prover_sync.rs b/rust/agents/processor/src/prover_sync.rs index 78998ee74..84c946d82 100644 --- a/rust/agents/processor/src/prover_sync.rs +++ b/rust/agents/processor/src/prover_sync.rs @@ -6,13 +6,10 @@ use optics_core::{ traits::{ChainCommunicationError, Common, Home}, }; use rocksdb::DB; -use std::{ops::Range, sync::Arc, time::Duration}; -use tokio::{ - sync::{ - oneshot::{error::TryRecvError, Receiver}, - RwLock, - }, - time::sleep, +use std::{ops::Range, sync::Arc}; +use tokio::sync::{ + oneshot::{error::TryRecvError, Receiver}, + RwLock, }; use tracing::{debug, info, instrument}; @@ -133,6 +130,7 @@ impl ProverSync { // expensive and poorly done async fn get_leaf_range(&mut self, range: Range) -> Result, ProverSyncError> { let mut leaves = vec![]; + for i in range { let leaf = self.fetch_leaf(i).await?; if leaf.is_none() { @@ -293,8 +291,6 @@ impl ProverSync { info!("ProverSync: Parent task has shut down."); break; } - - sleep(Duration::from_secs(2)).await; } Ok(())