aboutsummaryrefslogtreecommitdiff
path: root/p2p/src
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/src')
-rw-r--r--p2p/src/backend.rs2
-rw-r--r--p2p/src/conn_queue.rs (renamed from p2p/src/connection.rs)0
-rw-r--r--p2p/src/discovery/mod.rs2
-rw-r--r--p2p/src/lib.rs2
-rw-r--r--p2p/src/peer/mod.rs2
-rw-r--r--p2p/src/peer_pool.rs8
6 files changed, 8 insertions, 8 deletions
diff --git a/p2p/src/backend.rs b/p2p/src/backend.rs
index 98297e5..16cc20b 100644
--- a/p2p/src/backend.rs
+++ b/p2p/src/backend.rs
@@ -6,7 +6,7 @@ use karyon_core::{async_runtime::Executor, crypto::KeyPair};
use crate::{
config::Config,
- connection::ConnQueue,
+ conn_queue::ConnQueue,
discovery::{ArcDiscovery, Discovery},
monitor::Monitor,
peer_pool::PeerPool,
diff --git a/p2p/src/connection.rs b/p2p/src/conn_queue.rs
index 9a153f3..9a153f3 100644
--- a/p2p/src/connection.rs
+++ b/p2p/src/conn_queue.rs
diff --git a/p2p/src/discovery/mod.rs b/p2p/src/discovery/mod.rs
index 64e5c14..529469e 100644
--- a/p2p/src/discovery/mod.rs
+++ b/p2p/src/discovery/mod.rs
@@ -16,7 +16,7 @@ use karyon_net::{Conn, Endpoint};
use crate::{
config::Config,
- connection::{ConnDirection, ConnQueue},
+ conn_queue::{ConnDirection, ConnQueue},
connector::Connector,
listener::Listener,
message::NetMsg,
diff --git a/p2p/src/lib.rs b/p2p/src/lib.rs
index c873980..546353a 100644
--- a/p2p/src/lib.rs
+++ b/p2p/src/lib.rs
@@ -40,7 +40,7 @@
mod backend;
mod codec;
mod config;
-mod connection;
+mod conn_queue;
mod connector;
mod discovery;
mod error;
diff --git a/p2p/src/peer/mod.rs b/p2p/src/peer/mod.rs
index f0f6f17..b4cfd3a 100644
--- a/p2p/src/peer/mod.rs
+++ b/p2p/src/peer/mod.rs
@@ -18,7 +18,7 @@ use karyon_core::{
use karyon_net::{Conn, Endpoint};
use crate::{
- connection::ConnDirection,
+ conn_queue::ConnDirection,
message::{NetMsg, NetMsgCmd, ProtocolMsg, ShutdownMsg},
peer_pool::{ArcPeerPool, WeakPeerPool},
protocol::{Protocol, ProtocolEvent, ProtocolID},
diff --git a/p2p/src/peer_pool.rs b/p2p/src/peer_pool.rs
index 07bb73d..79fd4b4 100644
--- a/p2p/src/peer_pool.rs
+++ b/p2p/src/peer_pool.rs
@@ -21,7 +21,7 @@ use karyon_net::Conn;
use crate::{
config::Config,
- connection::{ConnDirection, ConnQueue},
+ conn_queue::{ConnDirection, ConnQueue},
message::{get_msg_payload, NetMsg, NetMsgCmd, VerAckMsg, VerMsg},
monitor::{Monitor, PeerPoolEvent},
peer::{ArcPeer, Peer, PeerID},
@@ -99,11 +99,11 @@ impl PeerPool {
/// Listens to a new connection from the connection queue
pub async fn listen_loop(self: Arc<Self>) {
loop {
- let new_conn = self.conn_queue.next().await;
- let signal = new_conn.disconnect_signal;
+ let conn = self.conn_queue.next().await;
+ let signal = conn.disconnect_signal;
let result = self
- .new_peer(new_conn.conn, &new_conn.direction, signal.clone())
+ .new_peer(conn.conn, &conn.direction, signal.clone())
.await;
// Only send a disconnect signal if there is an error when adding a peer.