Skip to content

Commit fd94b29

Browse files
committed
fmt fix
1 parent 4426d98 commit fd94b29

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

apps/pyth-lazer-agent/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub struct Config {
2020
pub publish_interval_duration: Duration,
2121
pub history_service_url: Option<Url>,
2222
#[serde(default)]
23-
pub enable_update_deduplication: bool
23+
pub enable_update_deduplication: bool,
2424
}
2525

2626
#[derive(Deserialize, Derivative, Clone, PartialEq)]

apps/pyth-lazer-agent/src/lazer_publisher.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use std::collections::HashMap;
21
use crate::config::{CHANNEL_CAPACITY, Config};
32
use crate::relayer_session::RelayerSessionTask;
43
use anyhow::{Context, Result, bail};
@@ -14,6 +13,7 @@ use pyth_lazer_publisher_sdk::transaction::{
1413
Ed25519SignatureData, LazerTransaction, SignatureData, SignedLazerTransaction,
1514
};
1615
use solana_keypair::read_keypair_file;
16+
use std::collections::HashMap;
1717
use std::path::PathBuf;
1818
use std::sync::Arc;
1919
use std::sync::atomic::AtomicBool;
@@ -206,17 +206,17 @@ fn deduplicate_feed_updates(feed_updates: &Vec<FeedUpdate>) -> Result<Vec<FeedUp
206206
#[cfg(test)]
207207
mod tests {
208208
use crate::config::{CHANNEL_CAPACITY, Config};
209-
use crate::lazer_publisher::{deduplicate_feed_updates, LazerPublisherTask};
209+
use crate::lazer_publisher::{LazerPublisherTask, deduplicate_feed_updates};
210210
use ed25519_dalek::SigningKey;
211211
use protobuf::well_known_types::timestamp::Timestamp;
212212
use protobuf::{Message, MessageField};
213+
use pyth_lazer_protocol::time::TimestampUs;
213214
use pyth_lazer_publisher_sdk::publisher_update::feed_update::Update;
214215
use pyth_lazer_publisher_sdk::publisher_update::{FeedUpdate, PriceUpdate};
215216
use pyth_lazer_publisher_sdk::transaction::{LazerTransaction, lazer_transaction};
216217
use std::io::Write;
217218
use std::path::PathBuf;
218219
use std::time::Duration;
219-
use pyth_lazer_protocol::time::TimestampUs;
220220
use tempfile::NamedTempFile;
221221
use tokio::sync::broadcast::error::TryRecvError;
222222
use tokio::sync::{broadcast, mpsc};
@@ -345,7 +345,10 @@ mod tests {
345345
test_feed_update(1, TimestampUs::from_millis(6).unwrap(), 10),
346346
];
347347

348-
assert_eq!(deduplicate_feed_updates(&updates).unwrap(), expected_updates);
348+
assert_eq!(
349+
deduplicate_feed_updates(&updates).unwrap(),
350+
expected_updates
351+
);
349352
}
350353

351354
#[test]
@@ -365,6 +368,9 @@ mod tests {
365368
test_feed_update(2, TimestampUs::from_millis(6).unwrap(), 10),
366369
];
367370

368-
assert_eq!(deduplicate_feed_updates(&updates).unwrap(), expected_updates);
371+
assert_eq!(
372+
deduplicate_feed_updates(&updates).unwrap(),
373+
expected_updates
374+
);
369375
}
370376
}

0 commit comments

Comments
 (0)