bug: remove ancient debug rate limiter in prover_sync (#686)

buddies-main-deployment
James Prestwich 3 years ago committed by GitHub
parent 0f0cf57edb
commit e5328d3105
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      rust/agents/processor/src/prover_sync.rs

@ -6,13 +6,10 @@ use optics_core::{
traits::{ChainCommunicationError, Common, Home}, traits::{ChainCommunicationError, Common, Home},
}; };
use rocksdb::DB; use rocksdb::DB;
use std::{ops::Range, sync::Arc, time::Duration}; use std::{ops::Range, sync::Arc};
use tokio::{ use tokio::sync::{
sync::{ oneshot::{error::TryRecvError, Receiver},
oneshot::{error::TryRecvError, Receiver}, RwLock,
RwLock,
},
time::sleep,
}; };
use tracing::{debug, info, instrument}; use tracing::{debug, info, instrument};
@ -133,6 +130,7 @@ impl ProverSync {
// expensive and poorly done // expensive and poorly done
async fn get_leaf_range(&mut self, range: Range<usize>) -> Result<Vec<H256>, ProverSyncError> { async fn get_leaf_range(&mut self, range: Range<usize>) -> Result<Vec<H256>, ProverSyncError> {
let mut leaves = vec![]; let mut leaves = vec![];
for i in range { for i in range {
let leaf = self.fetch_leaf(i).await?; let leaf = self.fetch_leaf(i).await?;
if leaf.is_none() { if leaf.is_none() {
@ -293,8 +291,6 @@ impl ProverSync {
info!("ProverSync: Parent task has shut down."); info!("ProverSync: Parent task has shut down.");
break; break;
} }
sleep(Duration::from_secs(2)).await;
} }
Ok(()) Ok(())

Loading…
Cancel
Save