diff --git a/iot_verifier/src/main.rs b/iot_verifier/src/main.rs index c19c41c87..6111722f3 100644 --- a/iot_verifier/src/main.rs +++ b/iot_verifier/src/main.rs @@ -141,8 +141,8 @@ impl Server { pool: pool.clone(), rewards_sink, reward_manifests_sink, - reward_period_hours: settings.rewards, - reward_offset: settings.reward_offset_minutes, + reward_period_hours: settings.reward_period, + reward_offset: settings.reward_period_offset, price_tracker, }; diff --git a/iot_verifier/src/settings.rs b/iot_verifier/src/settings.rs index 4ab306dfd..34993eb9c 100644 --- a/iot_verifier/src/settings.rs +++ b/iot_verifier/src/settings.rs @@ -39,11 +39,11 @@ pub struct Settings { pub price_tracker: price::price_tracker::Settings, /// Reward period in hours. (Default to 24) #[serde(with = "humantime_serde", default = "default_reward_period")] - pub rewards: Duration, + pub reward_period: Duration, /// Reward calculation offset in minutes, rewards will be calculated at the end - /// of the reward period + reward_offset_minutes - #[serde(with = "humantime_serde", default = "default_reward_offset_minutes")] - pub reward_offset_minutes: Duration, + /// of the reward_period + reward_period_offset + #[serde(with = "humantime_serde", default = "default_reward_period_offset")] + pub reward_period_offset: Duration, #[serde(default = "default_max_witnesses_per_poc")] pub max_witnesses_per_poc: u64, /// The cadence at which hotspots are permitted to beacon (in seconds) @@ -177,7 +177,7 @@ fn default_reward_period() -> Duration { humantime::parse_duration("24 hours").unwrap() } -fn default_reward_offset_minutes() -> Duration { +fn default_reward_period_offset() -> Duration { humantime::parse_duration("30 minutes").unwrap() } diff --git a/mobile_verifier/src/rewarder.rs b/mobile_verifier/src/rewarder.rs index 473405bc3..8a0f7d839 100644 --- a/mobile_verifier/src/rewarder.rs +++ b/mobile_verifier/src/rewarder.rs @@ -92,7 +92,7 @@ where carrier_service_verifier, hex_boosting_info_resolver, settings.reward_period, - settings.reward_offset, + settings.reward_period_offset, mobile_rewards, reward_manifests, price_tracker, diff --git a/mobile_verifier/src/settings.rs b/mobile_verifier/src/settings.rs index 163871db1..e154fdb2e 100644 --- a/mobile_verifier/src/settings.rs +++ b/mobile_verifier/src/settings.rs @@ -18,8 +18,8 @@ pub struct Settings { /// Reward period in hours. (Default is 24 hours) #[serde(with = "humantime_serde", default = "default_reward_period")] pub reward_period: Duration, - #[serde(with = "humantime_serde", default = "default_reward_offset_minutes")] - pub reward_offset: Duration, + #[serde(with = "humantime_serde", default = "default_reward_period_offset")] + pub reward_period_offset: Duration, pub database: db_store::Settings, pub ingest: file_store::Settings, pub data_transfer_ingest: file_store::Settings, @@ -76,7 +76,7 @@ fn default_reward_period() -> Duration { humantime::parse_duration("24 hours").unwrap() } -fn default_reward_offset_minutes() -> Duration { +fn default_reward_period_offset() -> Duration { humantime::parse_duration("30 minutes").unwrap() }