being less aggressive in contract polling

This commit is contained in:
Jędrzej Stuczyński
2024-02-16 17:39:22 +00:00
parent 24a260fbc9
commit 8b0953624f
2 changed files with 6 additions and 1 deletions
@@ -191,6 +191,11 @@ impl<R: RngCore + CryptoRng + Clone> DkgController<R> {
self.state.in_progress_state_mut(epoch_id).unwrap().entered = true;
}
// so at this point we don't need to be polling the contract so often anymore, but we can't easily
// adjust the existing interval.
// however, what we can do is just wait here for a bit each iteration
tokio::time::sleep(Duration::from_secs(120)).await;
Ok(())
}
+1 -1
View File
@@ -30,7 +30,7 @@ mod upgrade_helpers;
pub const DEFAULT_LOCAL_VALIDATOR: &str = "http://localhost:26657";
pub const DEFAULT_DKG_CONTRACT_POLLING_RATE: Duration = Duration::from_secs(10);
pub const DEFAULT_DKG_CONTRACT_POLLING_RATE: Duration = Duration::from_secs(30);
const DEFAULT_GATEWAY_SENDING_RATE: usize = 200;
const DEFAULT_MAX_CONCURRENT_GATEWAY_CLIENTS: usize = 50;