Skip to content

Commit 3231af0

Browse files
committed
fix(kad): re-expose NodeStatus
The EntryView struct exposes the node status however its type is not public making it impossible to use the status field. This change re-exports NodeStatus according to the existing naming pattern. See libp2p#4108 which was fixed however the NodeStatus type was not exposed.
1 parent e545805 commit 3231af0

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

protocols/kad/CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
## 0.44.6 - unreleased
22

3-
- Rename `Kademlia` symbols to follow naming convention.
3+
- Rename `Kademlia` symbols to follow naming convention.
44
See [PR 4547].
5-
65
- Fix a bug where we didn't detect a remote peer moving into client-state.
76
See [PR 4639](https://github.com/libp2p/rust-libp2p/pull/4639).
7+
- Re-export NodeStatus
8+
See [PR 4645].
89

910
[PR 4547]: https://github.com/libp2p/rust-libp2p/pull/4547
11+
[PR 4645]: https://github.com/libp2p/rust-libp2p/pull/4645
1012

1113
## 0.44.5
1214
- Migrate to `quick-protobuf-codec` crate for codec logic.

protocols/kad/src/kbucket.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ mod entry;
7272
#[allow(clippy::assign_op_pattern)]
7373
mod key;
7474

75+
pub use bucket::NodeStatus;
7576
pub use entry::*;
7677

7778
use arrayvec::{self, ArrayVec};

protocols/kad/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ pub use behaviour::{
7272
pub use behaviour::{
7373
Behaviour, BucketInserts, Caching, Config, Event, ProgressStep, Quorum, StoreInserts,
7474
};
75-
pub use kbucket::{Distance as KBucketDistance, EntryView, KBucketRef, Key as KBucketKey};
75+
pub use kbucket::{
76+
Distance as KBucketDistance, EntryView, KBucketRef, Key as KBucketKey, NodeStatus,
77+
};
7678
pub use protocol::ConnectionType;
7779
pub use query::QueryId;
7880
pub use record_priv::{store, Key as RecordKey, ProviderRecord, Record};

0 commit comments

Comments
 (0)