Add support for Grandpa warp sync (#2301)

* Add support for Grandpa warp sync

* Don't pull the warp sync crate if not full-node
This commit is contained in:
Pierre Krieger
2021-01-21 21:27:14 +01:00
committed by GitHub
parent 8aee25cae2
commit cfb474cacb
3 changed files with 231 additions and 171 deletions
+4
View File
@@ -589,6 +589,10 @@ pub fn new_full<RuntimeApi, Executor>(
fn adjust_yamux(_: &mut sc_network::config::NetworkConfiguration) {}
adjust_yamux(&mut config.network);
config.network.request_response_protocols.push(sc_finality_grandpa_warp_sync::request_response_config_for_chain(
&config, task_manager.spawn_handle(), backend.clone(),
));
let (network, network_status_sinks, system_rpc_tx, network_starter) =
service::build_network(service::BuildNetworkParams {
config: &config,