Skip to content

Commit

Permalink
chore: doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
Frando committed Mar 15, 2024
1 parent 248c26a commit 55044d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
21 changes: 9 additions & 12 deletions iroh-bytes/src/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! The [`Downloader`] interacts with four main components to this end.
//! - [`Dialer`]: Used to queue opening connections to nodes we need to perform downloads.
//! - [`ProviderMap`]: Where the downloader obtains information about nodes that could be
//! - `ProviderMap`: Where the downloader obtains information about nodes that could be
//! used to perform a download.
//! - [`Store`]: Where data is stored.
//!
Expand Down Expand Up @@ -36,11 +36,6 @@ use std::{
time::Duration,
};

use crate::{
get::{db::DownloadProgress, Stats},
store::Store,
util::progress::{IdGenerator, ProgressSender},
};
use futures::{future::LocalBoxFuture, FutureExt, StreamExt};
use hashlink::LinkedHashSet;
use iroh_base::hash::{BlobFormat, Hash, HashAndFormat};
Expand All @@ -49,13 +44,15 @@ use tokio::{
sync::{mpsc, oneshot},
task::JoinSet,
};
use tokio_util::{
sync::CancellationToken,
task::LocalPoolHandle,
time::delay_queue::{self, DelayQueue},
};
use tokio_util::{sync::CancellationToken, task::LocalPoolHandle, time::delay_queue};
use tracing::{debug, error_span, trace, warn, Instrument};

use crate::{
get::{db::DownloadProgress, Stats},
store::Store,
util::progress::{IdGenerator, ProgressSender},
};

mod get;
mod invariants;
mod progress;
Expand Down Expand Up @@ -443,7 +440,7 @@ struct Service<G: Getter, D: Dialer> {
/// Active connections
nodes: HashMap<NodeId, ConnectionInfo<D::Connection>>,
/// Queue to manage dropping nodes.
goodbye_nodes_queue: DelayQueue<NodeId>,
goodbye_nodes_queue: delay_queue::DelayQueue<NodeId>,
/// Queue of pending downloads.
queue: LinkedHashSet<DownloadKind>,
/// Information about pending and active requests
Expand Down
4 changes: 2 additions & 2 deletions iroh-bytes/src/downloader/test/dialer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct TestingDialerInner {
/// Peers that are being dialed.
dialing: HashSet<NodeId>,
/// Queue of dials.
dial_futs: DelayQueue<NodeId>,
dial_futs: delay_queue::DelayQueue<NodeId>,
/// History of attempted dials.
dial_history: Vec<NodeId>,
/// How long does a dial last.
Expand All @@ -32,7 +32,7 @@ impl Default for TestingDialerInner {
fn default() -> Self {
TestingDialerInner {
dialing: HashSet::default(),
dial_futs: DelayQueue::default(),
dial_futs: delay_queue::DelayQueue::default(),
dial_history: Vec::default(),
dial_duration: Duration::ZERO,
dial_outcome: Box::new(|_| true),
Expand Down

0 comments on commit 55044d7

Please sign in to comment.