mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Prepare for network protocol version upgrades (#5084)
* explicitly tag network requests with version * fmt * make PeerSet more aware of versioning * some generalization of the network bridge to support upgrades * walk back some renaming * walk back some version stuff * extract version from fallback * remove V1 from NetworkBridgeUpdate * add accidentally-removed timer * implement focusing for versioned messages * fmt * fix up network bridge & tests * remove inaccurate version check in bridge * remove some TODO [now]s * fix fallout in statement distribution * fmt * fallout in gossip-support * fix fallout in collator-protocol * fix fallout in bitfield-distribution * fix fallout in approval-distribution * fmt * use never! * fmt
This commit is contained in:
@@ -77,7 +77,7 @@ use polkadot_primitives::{
|
||||
};
|
||||
use sp_api::{ApiExt, ProvideRuntimeApi};
|
||||
|
||||
use polkadot_node_network_protocol::v1 as protocol_v1;
|
||||
use polkadot_node_network_protocol::VersionedValidationProtocol;
|
||||
use polkadot_node_subsystem_types::messages::{
|
||||
ApprovalDistributionMessage, ApprovalVotingMessage, AvailabilityDistributionMessage,
|
||||
AvailabilityRecoveryMessage, AvailabilityStoreMessage, BitfieldDistributionMessage,
|
||||
@@ -414,7 +414,7 @@ pub async fn forward_events<P: BlockchainEvents<Block>>(client: Arc<P>, mut hand
|
||||
event=Event,
|
||||
signal=OverseerSignal,
|
||||
error=SubsystemError,
|
||||
network=NetworkBridgeEvent<protocol_v1::ValidationProtocol>,
|
||||
network=NetworkBridgeEvent<VersionedValidationProtocol>,
|
||||
)]
|
||||
pub struct Overseer<SupportsParachains> {
|
||||
#[subsystem(no_dispatch, CandidateValidationMessage)]
|
||||
|
||||
@@ -848,7 +848,7 @@ fn test_network_bridge_event<M>() -> NetworkBridgeEvent<M> {
|
||||
}
|
||||
|
||||
fn test_statement_distribution_msg() -> StatementDistributionMessage {
|
||||
StatementDistributionMessage::NetworkBridgeUpdateV1(test_network_bridge_event())
|
||||
StatementDistributionMessage::NetworkBridgeUpdate(test_network_bridge_event())
|
||||
}
|
||||
|
||||
fn test_availability_recovery_msg() -> AvailabilityRecoveryMessage {
|
||||
@@ -862,7 +862,7 @@ fn test_availability_recovery_msg() -> AvailabilityRecoveryMessage {
|
||||
}
|
||||
|
||||
fn test_bitfield_distribution_msg() -> BitfieldDistributionMessage {
|
||||
BitfieldDistributionMessage::NetworkBridgeUpdateV1(test_network_bridge_event())
|
||||
BitfieldDistributionMessage::NetworkBridgeUpdate(test_network_bridge_event())
|
||||
}
|
||||
|
||||
fn test_provisioner_msg() -> ProvisionerMessage {
|
||||
|
||||
Reference in New Issue
Block a user