From 93aa21aba9c861f3fa2567ed368c54f6460fed10 Mon Sep 17 00:00:00 2001 From: joshuef Date: Tue, 27 Jun 2023 10:58:22 +0900 Subject: [PATCH] fix(kad): re-expose Distance as KBucketDistance Adds back in Distance as a public type. Follows `KBucketKey` naming for clarity. Resolves #4108. Pull-Request: #4109. Co-Authored-By: Josh Wilson Co-Authored-By: Max Inden --- Cargo.lock | 2 +- Cargo.toml | 2 +- protocols/kad/CHANGELOG.md | 9 ++++++++- protocols/kad/Cargo.toml | 2 +- protocols/kad/src/lib.rs | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c6e5c848f21..b5a9974fbee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2762,7 +2762,7 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.44.0" +version = "0.44.1" dependencies = [ "arrayvec", "async-std", diff --git a/Cargo.toml b/Cargo.toml index 72c2d1cdb2f..958aadc36c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,7 +73,7 @@ libp2p-floodsub = { version = "0.43.0", path = "protocols/floodsub" } libp2p-gossipsub = { version = "0.45.0", path = "protocols/gossipsub" } libp2p-identify = { version = "0.43.0", path = "protocols/identify" } libp2p-identity = { version = "0.2.0" } -libp2p-kad = { version = "0.44.0", path = "protocols/kad" } +libp2p-kad = { version = "0.44.1", path = "protocols/kad" } libp2p-mdns = { version = "0.44.0", path = "protocols/mdns" } libp2p-metrics = { version = "0.13.0", path = "misc/metrics" } libp2p-mplex = { version = "0.40.0", path = "muxers/mplex" } diff --git a/protocols/kad/CHANGELOG.md b/protocols/kad/CHANGELOG.md index f545ba69885..899f2519a98 100644 --- a/protocols/kad/CHANGELOG.md +++ b/protocols/kad/CHANGELOG.md @@ -1,4 +1,11 @@ -## 0.44.0 +## 0.44.1 + +- Expose `KBucketDistance`. + See [PR 4109]. + +[PR 4109]: https://github.com/libp2p/rust-libp2p/pull/4109 + +## 0.44.0 - Raise MSRV to 1.65. See [PR 3715]. diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 6fac39006df..72a90fbdb6c 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-kad" edition = "2021" rust-version = "1.65.0" description = "Kademlia protocol for libp2p" -version = "0.44.0" +version = "0.44.1" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/kad/src/lib.rs b/protocols/kad/src/lib.rs index 7e51f8b9908..fbf8a0b0e12 100644 --- a/protocols/kad/src/lib.rs +++ b/protocols/kad/src/lib.rs @@ -76,7 +76,7 @@ pub use behaviour::{ Kademlia, KademliaBucketInserts, KademliaCaching, KademliaConfig, KademliaEvent, KademliaStoreInserts, ProgressStep, Quorum, }; -pub use kbucket::{EntryView, KBucketRef, Key as KBucketKey}; +pub use kbucket::{Distance as KBucketDistance, EntryView, KBucketRef, Key as KBucketKey}; pub use protocol::KadConnectionType; pub use query::QueryId; pub use record_priv::{store, Key as RecordKey, ProviderRecord, Record};