Skip to content

Commit 2872c68

Browse files
authored
fix: add missing humantime attribute to config and change default to 3s (#142)
* fix: add missing humantime attribute to config * chore: change default unchanged_publish_threshold from 5s to 3s
1 parent 2fb3775 commit 2872c68

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

config/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ key_store.mapping_key = "RelevantOracleMappingAddress"
8787
# Wait at least this long before publishing an unchanged price
8888
# state; unchanged price state means only timestamp has changed
8989
# with other state identical to last published state.
90-
# exporter.unchanged_publish_threshold = "5s"
90+
# exporter.unchanged_publish_threshold = "3s"
9191

9292
# Maximum size of a batch
9393
# exporter.max_batch_size = 12

src/agent/services/exporter.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pub struct Config {
4646
/// Wait at least this long before publishing an unchanged price
4747
/// state; unchanged price state means only timestamp has changed
4848
/// with other state identical to last published state.
49+
#[serde(with = "humantime_serde")]
4950
pub unchanged_publish_threshold: Duration,
5051
/// Maximum size of a batch
5152
pub max_batch_size: usize,
@@ -80,7 +81,7 @@ impl Default for Config {
8081
refresh_network_state_interval_duration: Duration::from_millis(200),
8182
publish_interval_duration: Duration::from_secs(1),
8283
staleness_threshold: Duration::from_secs(5),
83-
unchanged_publish_threshold: Duration::from_secs(5),
84+
unchanged_publish_threshold: Duration::from_secs(3),
8485
max_batch_size: 12,
8586
inflight_transactions_channel_capacity: 10000,
8687
transaction_monitor: Default::default(),

0 commit comments

Comments
 (0)