Skip to content

Commit

Permalink
fix: increase retry attempts for epoch registration and update RPC co…
Browse files Browse the repository at this point in the history
…nnection initialization for epoch registration preparation (Lightprotocol#1505)
  • Loading branch information
sergeytimoshin authored Jan 23, 2025
1 parent 72a5a3b commit 4c01046
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions forester/src/epoch_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ impl<R: RpcConnection, I: Indexer<R> + IndexerType<R>> EpochManager<R, I> {
Err(e) => {
warn!("Failed to recover registration info: {:?}", e);
// If recovery fails, attempt to register
self.register_for_epoch_with_retry(epoch, 20, Duration::from_millis(1000))
self.register_for_epoch_with_retry(epoch, 100, Duration::from_millis(1000))
.await?
}
};
Expand Down Expand Up @@ -459,7 +459,8 @@ impl<R: RpcConnection, I: Indexer<R> + IndexerType<R>> EpochManager<R, I> {
max_retries: u32,
retry_delay: Duration,
) -> Result<ForesterEpochInfo> {
let mut rpc = self.rpc_pool.get_connection().await?;
let mut rpc =
SolanaRpcConnection::new(self.config.external_services.rpc_url.as_str(), None);
let slot = rpc.get_slot().await?;
let phases = get_epoch_phases(&self.protocol_config, epoch);

Expand Down

0 comments on commit 4c01046

Please sign in to comment.