Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix last OutboundQueryCompleted in kad doc #4257

Merged
merged 3 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions protocols/kad/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@

[PR 4224]: https://github.com/libp2p/rust-libp2p/pull/4224

- Rename missed `KademliaEvent::OutboundQueryCompleted` to `KademliaEvent::OutboundQueryProgressed` in documentation.
See [PR 4257].

[PR 4257]: https://github.com/libp2p/rust-libp2p/pull/4257

## 0.44.2

- Allow to explicitly set `Mode::{Client,Server}`.
Expand Down
12 changes: 6 additions & 6 deletions protocols/kad/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ where
/// Initiates an iterative query for the closest peers to the given key.
///
/// The result of the query is delivered in a
/// [`KademliaEvent::OutboundQueryCompleted{QueryResult::GetClosestPeers}`].
/// [`KademliaEvent::OutboundQueryProgressed{QueryResult::GetClosestPeers}`].
pub fn get_closest_peers<K>(&mut self, key: K) -> QueryId
where
K: Into<kbucket::Key<K>> + Into<Vec<u8>> + Clone,
Expand All @@ -692,7 +692,7 @@ where
/// Performs a lookup for a record in the DHT.
///
/// The result of this operation is delivered in a
/// [`KademliaEvent::OutboundQueryCompleted{QueryResult::GetRecord}`].
/// [`KademliaEvent::OutboundQueryProgressed{QueryResult::GetRecord}`].
pub fn get_record(&mut self, key: record_priv::Key) -> QueryId {
let record = if let Some(record) = self.store.get(&key) {
if record.is_expired(Instant::now()) {
Expand Down Expand Up @@ -753,7 +753,7 @@ where
/// Returns `Ok` if a record has been stored locally, providing the
/// `QueryId` of the initial query that replicates the record in the DHT.
/// The result of the query is eventually reported as a
/// [`KademliaEvent::OutboundQueryCompleted{QueryResult::PutRecord}`].
/// [`KademliaEvent::OutboundQueryProgressed{QueryResult::PutRecord}`].
///
/// The record is always stored locally with the given expiration. If the record's
/// expiration is `None`, the common case, it does not expire in local storage
Expand Down Expand Up @@ -869,7 +869,7 @@ where
///
/// Returns `Ok` if bootstrapping has been initiated with a self-lookup, providing the
/// `QueryId` for the entire bootstrapping process. The progress of bootstrapping is
/// reported via [`KademliaEvent::OutboundQueryCompleted{QueryResult::Bootstrap}`] events,
/// reported via [`KademliaEvent::OutboundQueryProgressed{QueryResult::Bootstrap}`] events,
/// with one such event per bootstrapping query.
///
/// Returns `Err` if bootstrapping is impossible due an empty routing table.
Expand Down Expand Up @@ -913,7 +913,7 @@ where
/// of the libp2p Kademlia provider API.
///
/// The results of the (repeated) provider announcements sent by this node are
/// reported via [`KademliaEvent::OutboundQueryCompleted{QueryResult::StartProviding}`].
/// reported via [`KademliaEvent::OutboundQueryProgressed{QueryResult::StartProviding}`].
pub fn start_providing(&mut self, key: record_priv::Key) -> Result<QueryId, store::Error> {
// Note: We store our own provider records locally without local addresses
// to avoid redundant storage and outdated addresses. Instead these are
Expand Down Expand Up @@ -950,7 +950,7 @@ where
/// Performs a lookup for providers of a value to the given key.
///
/// The result of this operation is delivered in a
/// reported via [`KademliaEvent::OutboundQueryCompleted{QueryResult::GetProviders}`].
/// reported via [`KademliaEvent::OutboundQueryProgressed{QueryResult::GetProviders}`].
pub fn get_providers(&mut self, key: record_priv::Key) -> QueryId {
let providers: HashSet<_> = self
.store
Expand Down