1
- use std:: collections:: HashMap ;
2
1
use crate :: config:: { CHANNEL_CAPACITY , Config } ;
3
2
use crate :: relayer_session:: RelayerSessionTask ;
4
3
use anyhow:: { Context , Result , bail} ;
@@ -14,6 +13,7 @@ use pyth_lazer_publisher_sdk::transaction::{
14
13
Ed25519SignatureData , LazerTransaction , SignatureData , SignedLazerTransaction ,
15
14
} ;
16
15
use solana_keypair:: read_keypair_file;
16
+ use std:: collections:: HashMap ;
17
17
use std:: path:: PathBuf ;
18
18
use std:: sync:: Arc ;
19
19
use std:: sync:: atomic:: AtomicBool ;
@@ -206,17 +206,17 @@ fn deduplicate_feed_updates(feed_updates: &Vec<FeedUpdate>) -> Result<Vec<FeedUp
206
206
#[ cfg( test) ]
207
207
mod tests {
208
208
use crate :: config:: { CHANNEL_CAPACITY , Config } ;
209
- use crate :: lazer_publisher:: { deduplicate_feed_updates , LazerPublisherTask } ;
209
+ use crate :: lazer_publisher:: { LazerPublisherTask , deduplicate_feed_updates } ;
210
210
use ed25519_dalek:: SigningKey ;
211
211
use protobuf:: well_known_types:: timestamp:: Timestamp ;
212
212
use protobuf:: { Message , MessageField } ;
213
+ use pyth_lazer_protocol:: time:: TimestampUs ;
213
214
use pyth_lazer_publisher_sdk:: publisher_update:: feed_update:: Update ;
214
215
use pyth_lazer_publisher_sdk:: publisher_update:: { FeedUpdate , PriceUpdate } ;
215
216
use pyth_lazer_publisher_sdk:: transaction:: { LazerTransaction , lazer_transaction} ;
216
217
use std:: io:: Write ;
217
218
use std:: path:: PathBuf ;
218
219
use std:: time:: Duration ;
219
- use pyth_lazer_protocol:: time:: TimestampUs ;
220
220
use tempfile:: NamedTempFile ;
221
221
use tokio:: sync:: broadcast:: error:: TryRecvError ;
222
222
use tokio:: sync:: { broadcast, mpsc} ;
@@ -345,7 +345,10 @@ mod tests {
345
345
test_feed_update( 1 , TimestampUs :: from_millis( 6 ) . unwrap( ) , 10 ) ,
346
346
] ;
347
347
348
- assert_eq ! ( deduplicate_feed_updates( & updates) . unwrap( ) , expected_updates) ;
348
+ assert_eq ! (
349
+ deduplicate_feed_updates( & updates) . unwrap( ) ,
350
+ expected_updates
351
+ ) ;
349
352
}
350
353
351
354
#[ test]
@@ -365,6 +368,9 @@ mod tests {
365
368
test_feed_update( 2 , TimestampUs :: from_millis( 6 ) . unwrap( ) , 10 ) ,
366
369
] ;
367
370
368
- assert_eq ! ( deduplicate_feed_updates( & updates) . unwrap( ) , expected_updates) ;
371
+ assert_eq ! (
372
+ deduplicate_feed_updates( & updates) . unwrap( ) ,
373
+ expected_updates
374
+ ) ;
369
375
}
370
376
}
0 commit comments