From e15d3e6fd20b3f87abaad7ddec1c88b0e66419f9 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Mon, 15 Jul 2024 13:16:01 +0200 Subject: p2p: Major refactoring of the handshake protocol Introduce a new protocol InitProtocol which can be used as the core protocol for initializing a connection with a peer. Move the handshake logic from the PeerPool module to the protocols directory and build a handshake protocol that implements InitProtocol trait. --- p2p/src/protocols/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'p2p/src/protocols/mod.rs') diff --git a/p2p/src/protocols/mod.rs b/p2p/src/protocols/mod.rs index 4a8f6b9..c58df03 100644 --- a/p2p/src/protocols/mod.rs +++ b/p2p/src/protocols/mod.rs @@ -1,3 +1,5 @@ +mod handshake; mod ping; -pub use ping::PingProtocol; +pub(crate) use handshake::HandshakeProtocol; +pub(crate) use ping::PingProtocol; -- cgit v1.2.3