Skip to content

Commit

Permalink
Revert renaming from Gossipsub to Behaviour in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
StemCll committed Jan 13, 2023
1 parent 3c6b832 commit 51e2bf6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions protocols/gossipsub/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ where
D: DataTransform + Default,
F: TopicSubscriptionFilter + Default,
{
/// Creates a [`Behaviour`] struct given a set of parameters specified via a
/// Creates a Gossipsub [`Behaviour`] struct given a set of parameters specified via a
/// [`Config`]. This has no subscription filter and uses no compression.
pub fn new(privacy: MessageAuthenticity, config: Config) -> Result<Self, &'static str> {
Self::new_with_subscription_filter_and_transform(
Expand All @@ -328,7 +328,7 @@ where
)
}

/// Creates a [`Behaviour`] struct given a set of parameters specified via a
/// Creates a Gossipsub [`Behaviour`] struct given a set of parameters specified via a
/// [`Config`]. This has no subscription filter and uses no compression.
/// Metrics can be evaluated by passing a reference to a [`Registry`].
pub fn new_with_metrics(
Expand All @@ -352,7 +352,7 @@ where
D: DataTransform + Default,
F: TopicSubscriptionFilter,
{
/// Creates a [`Behaviour`] struct given a set of parameters specified via a
/// Creates a Gossipsub [`Behaviour`] struct given a set of parameters specified via a
/// [`Config`] and a custom subscription filter.
pub fn new_with_subscription_filter(
privacy: MessageAuthenticity,
Expand All @@ -375,7 +375,7 @@ where
D: DataTransform,
F: TopicSubscriptionFilter + Default,
{
/// Creates a [`Behaviour`] struct given a set of parameters specified via a
/// Creates a Gossipsub [`Behaviour`] struct given a set of parameters specified via a
/// [`Config`] and a custom data transform.
pub fn new_with_transform(
privacy: MessageAuthenticity,
Expand All @@ -398,7 +398,7 @@ where
D: DataTransform,
F: TopicSubscriptionFilter,
{
/// Creates a [`Behaviour`] struct given a set of parameters specified via a
/// Creates a Gossipsub [`Behaviour`] struct given a set of parameters specified via a
/// [`Config`] and a custom subscription filter and data transform.
pub fn new_with_subscription_filter_and_transform(
privacy: MessageAuthenticity,
Expand Down Expand Up @@ -664,7 +664,7 @@ where
}
}

// Behaviour peers
// Gossipsub peers
if self.mesh.get(&topic_hash).is_none() {
debug!("Topic: {:?} not in the mesh", topic_hash);
// If we have fanout peers add them to the map.
Expand Down Expand Up @@ -913,7 +913,7 @@ where
}
}

/// Behaviour JOIN(topic) - adds topic peers to mesh and sends them GRAFT messages.
/// Gossipsub JOIN(topic) - adds topic peers to mesh and sends them GRAFT messages.
fn join(&mut self, topic_hash: &TopicHash) {
debug!("Running JOIN for topic: {:?}", topic_hash);

Expand Down Expand Up @@ -1060,7 +1060,7 @@ where
None => {
error!("Attempted to Prune an unknown peer");
}
_ => {} // Behaviour 1.1 peer perform the `Prune`
_ => {} // Gossipsub 1.1 peer perform the `Prune`
}

// Select peers for peer exchange
Expand Down Expand Up @@ -1095,7 +1095,7 @@ where
}
}

/// Behaviour LEAVE(topic) - Notifies mesh\[topic\] peers with PRUNE messages.
/// Gossipsub LEAVE(topic) - Notifies mesh\[topic\] peers with PRUNE messages.
fn leave(&mut self, topic_hash: &TopicHash) {
debug!("Running LEAVE for topic {:?}", topic_hash);

Expand Down Expand Up @@ -2877,7 +2877,7 @@ where
self.pending_iwant_msgs.clear();
}

/// Send a BehaviourRpc message to a peer. This will wrap the message in an arc if it
/// Send a [`Rpc`] message to a peer. This will wrap the message in an arc if it
/// is not already an arc.
fn send_message(
&mut self,
Expand Down
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::rpc_proto;
use crate::TopicHash;
use libp2p_core::{connection::ConnectionId, PeerId};
use prometheus_client::encoding::EncodeLabelValue;
use prost::Message as ProtobufMessage;
use prost::Message as _;
use std::fmt;
use std::fmt::Debug;

Expand Down

0 comments on commit 51e2bf6

Please sign in to comment.