mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 06:21:11 +00:00
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:
Generated
+140
-139
File diff suppressed because it is too large
Load Diff
@@ -36,9 +36,14 @@ impl PeerSet {
|
|||||||
/// network service.
|
/// network service.
|
||||||
pub fn get_info(self) -> NonDefaultSetConfig {
|
pub fn get_info(self) -> NonDefaultSetConfig {
|
||||||
let protocol = self.into_protocol_name();
|
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 {
|
match self {
|
||||||
PeerSet::Validation => NonDefaultSetConfig {
|
PeerSet::Validation => NonDefaultSetConfig {
|
||||||
notifications_protocol: protocol,
|
notifications_protocol: protocol,
|
||||||
|
max_notification_size,
|
||||||
set_config: sc_network::config::SetConfig {
|
set_config: sc_network::config::SetConfig {
|
||||||
in_peers: 25,
|
in_peers: 25,
|
||||||
out_peers: 0,
|
out_peers: 0,
|
||||||
@@ -48,6 +53,7 @@ impl PeerSet {
|
|||||||
},
|
},
|
||||||
PeerSet::Collation => NonDefaultSetConfig {
|
PeerSet::Collation => NonDefaultSetConfig {
|
||||||
notifications_protocol: protocol,
|
notifications_protocol: protocol,
|
||||||
|
max_notification_size,
|
||||||
set_config: SetConfig {
|
set_config: SetConfig {
|
||||||
in_peers: 25,
|
in_peers: 25,
|
||||||
out_peers: 0,
|
out_peers: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user