Companion PR for adding max notification sizes (#2287)

* Companion PR for adding max notification sizes

* Add TODO

* Missing ;

* =>

* Common limit

* "Update Substrate"

Co-authored-by: parity-processbot <>
This commit is contained in:
Pierre Krieger
2021-01-19 12:27:42 +01:00
committed by GitHub
parent 226af6a877
commit 3d75cc2001
2 changed files with 146 additions and 139 deletions
@@ -36,9 +36,14 @@ impl PeerSet {
/// network service.
pub fn get_info(self) -> NonDefaultSetConfig {
let protocol = self.into_protocol_name();
// TODO: lower this limit after https://github.com/paritytech/polkadot/issues/2283 is
// done and collations use request-response protocols
let max_notification_size = 16 * 1024 * 1024;
match self {
PeerSet::Validation => NonDefaultSetConfig {
notifications_protocol: protocol,
max_notification_size,
set_config: sc_network::config::SetConfig {
in_peers: 25,
out_peers: 0,
@@ -48,6 +53,7 @@ impl PeerSet {
},
PeerSet::Collation => NonDefaultSetConfig {
notifications_protocol: protocol,
max_notification_size,
set_config: SetConfig {
in_peers: 25,
out_peers: 0,