hopr_lib/
constants.rs

1use hopr_primitive_types::balance::XDaiBalance;
2
3/// Application version as presented externally using the heartbeat mechanism
4pub const APP_VERSION: &str = env!("CARGO_PKG_VERSION");
5
6/// Application version coerced into the `major`.`minor`.`patch` form
7pub const APP_VERSION_COERCED: &str = const_format::formatcp!(
8    "{}.{}.{}",
9    env!("CARGO_PKG_VERSION_MAJOR"),
10    env!("CARGO_PKG_VERSION_MINOR"),
11    env!("CARGO_PKG_VERSION_PATCH")
12);
13
14lazy_static::lazy_static! {
15    /// Minimum native token balance to start the node.
16    pub static ref  MIN_NATIVE_BALANCE: XDaiBalance = "0.001 xdai".parse().unwrap();
17    /// Balance that is suggested for funding the node the first time to make it start.
18    pub static ref  SUGGESTED_NATIVE_BALANCE: XDaiBalance = "0.01 xdai".parse().unwrap();
19}
20
21pub const ONBOARDING_INFORMATION_INTERVAL: std::time::Duration = std::time::Duration::from_secs(30);
22
23/// Default minimum quality of stored peer entries to re-sync from the persistent storage on
24/// node's startup.
25pub const DEFAULT_MIN_QUALITY_TO_SYNC: f64 = 0.9;