pub fn generate_request_response_config<Hash: AsRef<[u8]>>(
    protocol_id: ProtocolId,
    genesis_hash: Hash,
    fork_id: Option<&str>
) -> RequestResponseConfig
Expand description

Generates a RequestResponseConfig for the grandpa warp sync request protocol, refusing incoming requests.

Examples found in repository?
src/warp_request_handler.rs (line 87)
78
79
80
81
82
83
84
85
86
87
88
89
90
91
	pub fn new<Hash: AsRef<[u8]>>(
		protocol_id: ProtocolId,
		genesis_hash: Hash,
		fork_id: Option<&str>,
		backend: Arc<dyn WarpSyncProvider<TBlock>>,
	) -> (Self, RequestResponseConfig) {
		let (tx, request_receiver) = mpsc::channel(20);

		let mut request_response_config =
			generate_request_response_config(protocol_id, genesis_hash, fork_id);
		request_response_config.inbound_queue = Some(tx);

		(Self { backend, request_receiver }, request_response_config)
	}