Skip to content

Commit

Permalink
A0-1763: Remove v0 connections from clique (#895)
Browse files Browse the repository at this point in the history
* v0 removal

* Remove ConnectionType

* Update some comments
  • Loading branch information
krzysztofziobro authored Feb 6, 2023
1 parent cd1902d commit 83ad9e1
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 1,064 deletions.
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
6 changes: 2 additions & 4 deletions finality-aleph/src/network/clique/outgoing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ use log::{debug, info};
use tokio::time::{sleep, timeout, Duration};

use crate::network::clique::{
protocols::{
protocol, ConnectionType, ProtocolError, ProtocolNegotiationError, ResultForService,
},
protocols::{protocol, ProtocolError, ProtocolNegotiationError, ResultForService},
ConnectionInfo, Data, Dialer, PeerAddressInfo, PublicKey, SecretKey, LOG_TARGET,
};

Expand Down Expand Up @@ -110,7 +108,7 @@ pub async fn outgoing<SK: SecretKey, D: Data, A: Data + Debug, ND: Dialer<A>>(
// we send the "new" connection type, because we always assume it's new until proven
// otherwise, and here we did not even get the chance to attempt negotiating a protocol
if result_for_parent
.unbounded_send((public_key, None, ConnectionType::New))
.unbounded_send((public_key, None))
.is_err()
{
debug!(target: LOG_TARGET, "Could not send the closing message, we've probably been terminated by the parent service.");
Expand Down
Loading

0 comments on commit 83ad9e1

Please sign in to comment.