Companion PR for #8682 (#2958)

* Companion PR for #8682

* Compilation fix

* Update beefy

* update Substrate

Co-authored-by: parity-processbot <>
This commit is contained in:
Pierre Krieger
2021-05-06 16:41:28 +02:00
committed by GitHub
parent 1508024a47
commit 64c8b913c3
3 changed files with 187 additions and 157 deletions
+183 -156
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -573,7 +573,7 @@ async fn handle_network_messages<AD: validator_discovery::AuthorityDiscovery>(
Some(NetworkEvent::Dht(_))
| Some(NetworkEvent::SyncConnected { .. })
| Some(NetworkEvent::SyncDisconnected { .. }) => {}
Some(NetworkEvent::NotificationStreamOpened { remote: peer, protocol, role }) => {
Some(NetworkEvent::NotificationStreamOpened { remote: peer, protocol, role, .. }) => {
let role = ObservedRole::from(role);
let peer_set = match PeerSet::try_from_protocol_name(&protocol) {
None => continue,
@@ -1287,6 +1287,7 @@ mod tests {
self.send_network_event(NetworkEvent::NotificationStreamOpened {
remote: peer,
protocol: peer_set.into_protocol_name(),
negotiated_fallback: None,
role: role.into(),
}).await;
}
@@ -53,6 +53,7 @@ impl PeerSet {
match self {
PeerSet::Validation => NonDefaultSetConfig {
notifications_protocol: protocol,
fallback_names: Vec::new(),
max_notification_size,
set_config: sc_network::config::SetConfig {
// we allow full nodes to connect to validators for gossip
@@ -67,6 +68,7 @@ impl PeerSet {
},
PeerSet::Collation => NonDefaultSetConfig {
notifications_protocol: protocol,
fallback_names: Vec::new(),
max_notification_size,
set_config: SetConfig {
// Non-authority nodes don't need to accept incoming connections on this peer set: