Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
9 changes: 8 additions & 1 deletion protocols/kad/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# 0.40.0 [unreleased]
# 0.41.0 [unreleased]

- Remove deprecated `set_protocol_name()` from `KademliaConfig` & `KademliaProtocolConfig`.
Use `set_protocol_names()` instead. See [PR 2866].

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

# 0.40.0

- Add support for multiple protocol names. Update `Kademlia`, `KademliaConfig`,
and `KademliaProtocolConfig` accordingly. See [Issue 2837]. See [PR 2846].
Expand Down
10 changes: 0 additions & 10 deletions protocols/kad/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,6 @@ impl KademliaConfig {
self
}

/// Sets a custom protocol name.
///
/// Kademlia nodes only communicate with other nodes using the same protocol
/// name. Using a custom name therefore allows to segregate the DHT from
/// others, if that is desired.
#[deprecated(since = "0.40.0", note = "use `set_protocol_names()` instead")]
pub fn set_protocol_name(&mut self, name: impl Into<Cow<'static, [u8]>>) -> &mut Self {
self.set_protocol_names(std::iter::once(name.into()).collect())
}

/// Sets the timeout for a single query.
///
/// > **Note**: A single query usually comprises at least as many requests
Expand Down
7 changes: 0 additions & 7 deletions protocols/kad/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,6 @@ impl KademliaProtocolConfig {
self.protocol_names = names;
}

/// Sets single protocol name used on the wire. Can be used to create incompatibilities
/// between networks on purpose.
#[deprecated(since = "0.40.0", note = "use `set_protocol_names()` instead")]
pub fn set_protocol_name(&mut self, name: impl Into<Cow<'static, [u8]>>) {
self.set_protocol_names(std::iter::once(name.into()).collect());
}

/// Modifies the maximum allowed size of a single Kademlia packet.
pub fn set_max_packet_size(&mut self, size: usize) {
self.max_packet_size = size;
Expand Down