Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
v0 removal
  • Loading branch information
krzysztofziobro committed Jan 31, 2023
commit 3edf2ab44d1702526c1f296ad5492474e8f52d7e
301 changes: 0 additions & 301 deletions finality-aleph/src/network/clique/manager/legacy.rs

This file was deleted.

3 changes: 0 additions & 3 deletions finality-aleph/src/network/clique/manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ use futures::channel::mpsc;
use crate::network::{clique::PublicKey, Data, PeerId};

mod direction;
mod legacy;

use direction::DirectedPeers;
pub use legacy::Manager as LegacyManager;

/// Error during sending data through the Manager
#[derive(Debug, PartialEq, Eq)]
Expand Down
10 changes: 1 addition & 9 deletions finality-aleph/src/network/clique/protocols/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use crate::network::clique::{

mod handshake;
mod negotiation;
mod v0;
mod v1;

use handshake::HandshakeError;
Expand All @@ -22,8 +21,6 @@ pub type Version = u32;
#[derive(PartialEq, Debug, Eq, Clone, Copy)]
pub enum ConnectionType {
New,
LegacyIncoming,
LegacyOutgoing,
}

/// What connections send back to the service after they become established. Starts with a public
Expand All @@ -35,8 +32,6 @@ pub type ResultForService<PK, D> = (PK, Option<mpsc::UnboundedSender<D>>, Connec
/// Defines the protocol for communication.
#[derive(Debug, PartialEq, Eq)]
pub enum Protocol {
/// The first version of the protocol, with unidirectional connections.
V0,
/// The current version of the protocol, with pseudorandom connection direction and
/// multiplexing.
V1,
Expand Down Expand Up @@ -93,7 +88,7 @@ impl<PK: PublicKey> From<ReceiveError> for ProtocolError<PK> {

impl Protocol {
/// Minimal supported protocol version.
const MIN_VERSION: Version = 0;
const MIN_VERSION: Version = 1;

/// Maximal supported protocol version.
const MAX_VERSION: Version = 1;
Expand All @@ -108,7 +103,6 @@ impl Protocol {
) -> Result<(), ProtocolError<SK::PublicKey>> {
use Protocol::*;
match self {
V0 => v0::incoming(stream, secret_key, result_for_service, data_for_user).await,
V1 => v1::incoming(stream, secret_key, result_for_service, data_for_user).await,
}
}
Expand All @@ -124,7 +118,6 @@ impl Protocol {
) -> Result<(), ProtocolError<SK::PublicKey>> {
use Protocol::*;
match self {
V0 => v0::outgoing(stream, secret_key, public_key, result_for_service).await,
V1 => {
v1::outgoing(
stream,
Expand All @@ -144,7 +137,6 @@ impl TryFrom<Version> for Protocol {

fn try_from(version: Version) -> Result<Self, Self::Error> {
match version {
0 => Ok(Protocol::V0),
1 => Ok(Protocol::V1),
unknown_version => Err(unknown_version),
}
Expand Down
Loading