Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Add BEEFY gadget as extra peer set (#80)
Browse files Browse the repository at this point in the history
* Add BEEFY gadget as extra peer set

* use BEEFY protocol
  • Loading branch information
adoerr authored Feb 8, 2021
1 parent a0706aa commit 152e588
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions client/beefy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ use notification::BeefySignedCommitmentSender;

pub const BEEFY_PROTOCOL_NAME: &str = "/paritytech/beefy/1";

/// Returns the configuration value to put in
/// [`sc_network::config::NetworkConfiguration::extra_sets`].
pub fn beefy_peers_set_config() -> sc_network::config::NonDefaultSetConfig {
sc_network::config::NonDefaultSetConfig {
notifications_protocol: BEEFY_PROTOCOL_NAME.into(),
max_notification_size: 1024 * 1024,
set_config: sc_network::config::SetConfig {
in_peers: 25,
out_peers: 25,
reserved_nodes: Vec::new(),
non_reserved_mode: sc_network::config::NonReservedPeerMode::Accept,
},
}
}

/// Allows all gossip messages to get through.
struct AllowAll<Hash> {
topic: Hash,
Expand Down

0 comments on commit 152e588

Please sign in to comment.