Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
rodoufu committed Mar 5, 2025
1 parent 927ae6c commit ff9eeba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
5 changes: 4 additions & 1 deletion src/agent/services/oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ use {
},
state::oracle::Oracle,
},
anyhow::{Context, Result},
anyhow::{
Context,
Result,
},
solana_account_decoder::UiAccountEncoding,
solana_client::{
nonblocking::{
Expand Down
22 changes: 11 additions & 11 deletions src/agent/state/oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,30 +181,30 @@ pub struct Config {
pub handle_price_account_update_worker_poll_size: usize,
/// Channel size used to wait for the handle_price_account_update
#[serde(default = "default_handle_price_account_update_channel_size")]
pub handle_price_account_update_channel_size: usize,
pub handle_price_account_update_channel_size: usize,
/// Minimum time for a subscriber to run
#[serde(default = "default_subscriber_finished_min_time")]
pub subscriber_finished_min_time: Duration,
pub subscriber_finished_min_time: Duration,
/// Time to sleep if the subscriber do not run for more than the minimum time
#[serde(default = "default_subscriber_finished_sleep_time")]
pub subscriber_finished_sleep_time: Duration,
pub subscriber_finished_sleep_time: Duration,
}

impl Default for Config {
fn default() -> Self {
Self {
commitment: CommitmentLevel::Confirmed,
poll_interval_duration: Duration::from_secs(5),
subscriber_enabled: true,
updates_channel_capacity: 10000,
data_channel_capacity: 10000,
max_lookup_batch_size: 100,
commitment: CommitmentLevel::Confirmed,
poll_interval_duration: Duration::from_secs(5),
subscriber_enabled: true,
updates_channel_capacity: 10000,
data_channel_capacity: 10000,
max_lookup_batch_size: 100,
handle_price_account_update_worker_poll_size:
default_handle_price_account_update_worker_poll_size(),
handle_price_account_update_channel_size:
default_handle_price_account_update_channel_size(),
subscriber_finished_min_time: default_subscriber_finished_min_time(),
subscriber_finished_sleep_time: default_subscriber_finished_sleep_time(),
subscriber_finished_min_time: default_subscriber_finished_min_time(),
subscriber_finished_sleep_time: default_subscriber_finished_sleep_time(),
}
}
}
Expand Down

0 comments on commit ff9eeba

Please sign in to comment.