Skip to content

Commit

Permalink
fix(feeder): Type mismatches
Browse files Browse the repository at this point in the history
  • Loading branch information
KirilMihaylov committed Apr 2, 2024
1 parent a5d6b99 commit 10d1ea2
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions market-data-feeder/src/workers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ use std::{
use thiserror::Error;
use tokio::{
select,
sync::{
broadcast::{
self as tokio_broadcast,
error::{RecvError, SendError},
},
Mutex,
},
sync::{broadcast as tokio_broadcast, mpsc as tokio_mpsc, Mutex},
task::{JoinError, JoinSet},
time::{error::Elapsed, sleep, timeout, timeout_at, Instant},
};
Expand Down Expand Up @@ -162,7 +156,9 @@ pub async fn spawn(
all_checks_passed_sender
.send(())
.map(|_| SpawnResult::new(tx_generators_set, tx_result_senders))
.map_err(|SendError(())| error_mod::Application::NotifyAllChecksPassed)
.map_err(|tokio_broadcast::error::SendError(())| {
error_mod::Application::NotifyAllChecksPassed
})
}

async fn construct_comparison_provider(
Expand Down Expand Up @@ -508,8 +504,8 @@ where
P: Provider,
{
match all_checks_passed.recv().await {
Ok(()) | Err(RecvError::Lagged(_)) => {},
Err(RecvError::Closed) => {
Ok(()) | Err(tokio_broadcast::error::RecvError::Lagged(_)) => {},
Err(tokio_broadcast::error::RecvError::Closed) => {
return Err(error_mod::Worker::GetNotifiedAllChecksPassed)
},
}
Expand Down Expand Up @@ -629,7 +625,8 @@ where
NonZeroU64,
NonZeroU64,
Instant,
) -> Result<(), SendError<TxRequest<NonBlocking>>>
)
-> Result<(), tokio_mpsc::error::SendError<TxRequest<NonBlocking>>>
+ Send,
{
match provider.get_prices(true).await {
Expand Down

0 comments on commit 10d1ea2

Please sign in to comment.