1
1
use crate :: { event_submission:: RateLimit , Address , BigNum , ValidatorId } ;
2
- use lazy_static :: lazy_static ;
2
+ use once_cell :: sync :: Lazy ;
3
3
use serde:: { Deserialize , Deserializer , Serialize } ;
4
4
use serde_hex:: { SerHex , StrictPfx } ;
5
5
use std:: { collections:: HashMap , fs, num:: NonZeroU8 } ;
6
6
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
+ } ) ;
15
15
16
16
#[ derive( Serialize , Deserialize , Debug , Clone ) ]
17
17
pub struct TokenInfo {
@@ -32,7 +32,7 @@ pub struct Config {
32
32
pub msgs_find_limit : u32 ,
33
33
pub analytics_find_limit_v5 : u32 ,
34
34
// in milliseconds
35
- pub analytics_maxtime : u32 ,
35
+ pub analytics_maxtime_v5 : u32 ,
36
36
// in milliseconds
37
37
pub heartbeat_time : u32 ,
38
38
pub health_threshold_promilles : u32 ,
0 commit comments