mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Change request-response protocol names to include genesis hash & fork id (#5870)
This commit is contained in:
@@ -31,7 +31,7 @@ use sc_network_common::service::{
|
||||
|
||||
use polkadot_node_network_protocol::{
|
||||
peer_set::PeerSet,
|
||||
request_response::{OutgoingRequest, Recipient, Requests},
|
||||
request_response::{OutgoingRequest, Recipient, ReqProtocolNames, Requests},
|
||||
PeerId, ProtocolVersion, UnifiedReputationChange as Rep,
|
||||
};
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, Block, Hash};
|
||||
@@ -100,6 +100,7 @@ pub trait Network: Clone + Send + 'static {
|
||||
&self,
|
||||
authority_discovery: &mut AD,
|
||||
req: Requests,
|
||||
req_protocol_names: &ReqProtocolNames,
|
||||
if_disconnected: IfDisconnected,
|
||||
);
|
||||
|
||||
@@ -152,6 +153,7 @@ impl Network for Arc<NetworkService<Block, Hash>> {
|
||||
&self,
|
||||
authority_discovery: &mut AD,
|
||||
req: Requests,
|
||||
req_protocol_names: &ReqProtocolNames,
|
||||
if_disconnected: IfDisconnected,
|
||||
) {
|
||||
let (protocol, OutgoingRequest { peer, payload, pending_response }) = req.encode_request();
|
||||
@@ -197,7 +199,7 @@ impl Network for Arc<NetworkService<Block, Hash>> {
|
||||
NetworkService::start_request(
|
||||
&*self,
|
||||
peer_id,
|
||||
protocol.into_protocol_name(),
|
||||
req_protocol_names.get_name(protocol),
|
||||
payload,
|
||||
pending_response,
|
||||
if_disconnected,
|
||||
|
||||
Reference in New Issue
Block a user