Skip to content

Commit 334c5b6

Browse files
committed
fix: expose NodeStatus as KBucketNodeStatus
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 #4108 which was fixed however the NodeStatus type was not exposed.
1 parent 74c087d commit 334c5b6

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ 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,
77+
NodeStatus as KBucketNodeStatus,
78+
};
7679
pub use protocol::ConnectionType;
7780
pub use query::QueryId;
7881
pub use record_priv::{store, Key as RecordKey, ProviderRecord, Record};

0 commit comments

Comments
 (0)