Skip to content

Commit fc6a405

Browse files
committed
primitives - Config
- use once_cell::sync::Lazy - fix typo in config attribute
1 parent 442b589 commit fc6a405

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

primitives/src/config.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
use crate::{event_submission::RateLimit, Address, BigNum, ValidatorId};
2-
use lazy_static::lazy_static;
2+
use once_cell::sync::Lazy;
33
use serde::{Deserialize, Deserializer, Serialize};
44
use serde_hex::{SerHex, StrictPfx};
55
use std::{collections::HashMap, fs, num::NonZeroU8};
66

7-
lazy_static! {
8-
static ref DEVELOPMENT_CONFIG: Config =
9-
toml::from_str(include_str!("../../docs/config/dev.toml"))
10-
.expect("Failed to parse dev.toml config file");
11-
static ref PRODUCTION_CONFIG: Config =
12-
toml::from_str(include_str!("../../docs/config/prod.toml"))
13-
.expect("Failed to parse prod.toml config file");
14-
}
7+
static DEVELOPMENT_CONFIG: Lazy<Config> = Lazy::new(|| {
8+
toml::from_str(include_str!("../../docs/config/dev.toml"))
9+
.expect("Failed to parse dev.toml config file")
10+
});
11+
static PRODUCTION_CONFIG: Lazy<Config> = Lazy::new(|| {
12+
toml::from_str(include_str!("../../docs/config/prod.toml"))
13+
.expect("Failed to parse prod.toml config file")
14+
});
1515

1616
#[derive(Serialize, Deserialize, Debug, Clone)]
1717
pub struct TokenInfo {
@@ -32,7 +32,7 @@ pub struct Config {
3232
pub msgs_find_limit: u32,
3333
pub analytics_find_limit_v5: u32,
3434
// in milliseconds
35-
pub analytics_maxtime: u32,
35+
pub analytics_maxtime_v5: u32,
3636
// in milliseconds
3737
pub heartbeat_time: u32,
3838
pub health_threshold_promilles: u32,

0 commit comments

Comments
 (0)