expose basic node data

This commit is contained in:
Boog900 2024-10-17 20:54:59 +01:00
parent 06b70d9a0a
commit bf586aafc0
No known key found for this signature in database
GPG key ID: 42AB1287CB0041C2
2 changed files with 4 additions and 5 deletions

View file

@ -15,7 +15,7 @@ use tracing::Instrument;
use cuprate_helper::asynch::InfallibleOneshotReceiver; use cuprate_helper::asynch::InfallibleOneshotReceiver;
use cuprate_pruning::PruningSeed; use cuprate_pruning::PruningSeed;
use cuprate_wire::CoreSyncData; use cuprate_wire::{BasicNodeData, CoreSyncData};
use crate::{ use crate::{
handles::{ConnectionGuard, ConnectionHandle}, handles::{ConnectionGuard, ConnectionHandle},
@ -29,7 +29,6 @@ mod request_handler;
mod timeout_monitor; mod timeout_monitor;
pub use connector::{ConnectRequest, Connector}; pub use connector::{ConnectRequest, Connector};
use cuprate_wire::common::PeerSupportFlags;
pub use handshaker::{DoHandshakeRequest, HandshakeError, HandshakerBuilder}; pub use handshaker::{DoHandshakeRequest, HandshakeError, HandshakerBuilder};
/// An internal identifier for a given peer, will be their address if known /// An internal identifier for a given peer, will be their address if known
@ -63,8 +62,8 @@ pub struct PeerInformation<A> {
pub direction: ConnectionDirection, pub direction: ConnectionDirection,
/// The peer's [`PruningSeed`]. /// The peer's [`PruningSeed`].
pub pruning_seed: PruningSeed, pub pruning_seed: PruningSeed,
/// The peer's [`PeerSupportFlags`]. /// The peer's [`BasicNodeData`].
pub support_flags: PeerSupportFlags, pub basic_node_data: BasicNodeData,
/// The [`CoreSyncData`] of this peer. /// The [`CoreSyncData`] of this peer.
/// ///
/// Data across fields are not necessarily related, so [`CoreSyncData::top_id`] is not always the /// Data across fields are not necessarily related, so [`CoreSyncData::top_id`] is not always the

View file

@ -455,7 +455,7 @@ where
handle, handle,
direction, direction,
pruning_seed, pruning_seed,
support_flags: peer_node_data.support_flags, basic_node_data: peer_node_data,
core_sync_data: Arc::new(Mutex::new(peer_core_sync)), core_sync_data: Arc::new(Mutex::new(peer_core_sync)),
}; };