From f1503866d74a4d790cc35c671b3fd47113be97ee Mon Sep 17 00:00:00 2001 From: Tamas Blummer Date: Wed, 28 Feb 2018 10:42:23 +0100 Subject: [PATCH 1/2] RawNetworkMessage::command should be public. no harm and useful for debug messages. --- src/network/message.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/message.rs b/src/network/message.rs index 69ec7864..8a177c7c 100644 --- a/src/network/message.rs +++ b/src/network/message.rs @@ -123,7 +123,7 @@ pub enum NetworkMessage { } impl RawNetworkMessage { - fn command(&self) -> String { + pub fn command(&self) -> String { match self.payload { NetworkMessage::Version(_) => "version", NetworkMessage::Verack => "verack", From 3351f355830087c909036e7f285aae353118ec36 Mon Sep 17 00:00:00 2001 From: Tamas Blummer Date: Wed, 28 Feb 2018 20:27:52 +0100 Subject: [PATCH 2/2] add documentation --- src/network/message.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/network/message.rs b/src/network/message.rs index 8a177c7c..c092c2cd 100644 --- a/src/network/message.rs +++ b/src/network/message.rs @@ -123,6 +123,7 @@ pub enum NetworkMessage { } impl RawNetworkMessage { + /// Return the message command. This is useful for debug outputs. pub fn command(&self) -> String { match self.payload { NetworkMessage::Version(_) => "version",