Use new block requests protocol (#5760)

* Use new block requests protocol

* Tweak comment
This commit is contained in:
Pierre Krieger
2020-04-24 13:48:22 +02:00
committed by GitHub
parent dd31fae56c
commit 6a7e86e677
8 changed files with 591 additions and 149 deletions
+6 -2
View File
@@ -399,7 +399,10 @@ pub struct NetworkConfiguration {
/// Maximum number of peers to ask the same blocks in parallel.
pub max_parallel_downloads: u32,
/// Should we insert non-global addresses into the DHT?
pub allow_non_globals_in_dht: bool
pub allow_non_globals_in_dht: bool,
/// If true, uses the `/<chainid>/block-requests/<version>` experimental protocol rather than
/// the legacy substream. This option is meant to be hard-wired to `true` in the future.
pub use_new_block_requests_protocol: bool,
}
impl NetworkConfiguration {
@@ -430,7 +433,8 @@ impl NetworkConfiguration {
use_yamux_flow_control: false,
},
max_parallel_downloads: 5,
allow_non_globals_in_dht: false
allow_non_globals_in_dht: false,
use_new_block_requests_protocol: true,
}
}
}