light_client/indexer/
config.rs1#[derive(Debug, Clone, PartialEq, Default)]
2pub struct IndexerRpcConfig {
3 pub slot: u64,
4 pub retry_config: RetryConfig,
5}
6impl IndexerRpcConfig {
7 pub fn new(slot: u64) -> Self {
8 Self {
9 slot,
10 retry_config: RetryConfig::default(),
11 }
12 }
13}
14
15#[derive(Debug, Clone, PartialEq)]
16pub struct RetryConfig {
17 pub num_retries: u32,
18 pub delay_ms: u64,
19 pub max_delay_ms: u64,
20}
21
22impl Default for RetryConfig {
23 fn default() -> Self {
24 Self {
25 num_retries: 10,
26 delay_ms: 400,
27 max_delay_ms: 8000,
28 }
29 }
30}