aboutsummaryrefslogtreecommitdiff
path: root/src/peering
diff options
context:
space:
mode:
Diffstat (limited to 'src/peering')
-rw-r--r--src/peering/fullmesh.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/peering/fullmesh.rs b/src/peering/fullmesh.rs
index 012c5a0..7dfc5c4 100644
--- a/src/peering/fullmesh.rs
+++ b/src/peering/fullmesh.rs
@@ -29,7 +29,7 @@ const FAILED_PING_THRESHOLD: usize = 3;
// -- Protocol messages --
-#[derive(Serialize, Deserialize)]
+#[derive(Serialize, Deserialize, Clone)]
struct PingMessage {
pub id: u64,
pub peer_list_hash: hash::Digest,
@@ -39,7 +39,9 @@ impl Message for PingMessage {
type Response = PingMessage;
}
-#[derive(Serialize, Deserialize)]
+impl AutoSerialize for PingMessage {}
+
+#[derive(Serialize, Deserialize, Clone)]
struct PeerListMessage {
pub list: Vec<(NodeID, SocketAddr)>,
}
@@ -48,6 +50,8 @@ impl Message for PeerListMessage {
type Response = PeerListMessage;
}
+impl AutoSerialize for PeerListMessage {}
+
// -- Algorithm data structures --
#[derive(Debug)]