Merge pull request #49 from tamasblummer/public_command

[Trivial] RawNetworkMessage::command should be public.
This commit is contained in:
Andrew Poelstra 2018-03-09 15:01:03 +00:00 committed by GitHub
commit c92ede0cc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -123,7 +123,8 @@ pub enum NetworkMessage {
} }
impl RawNetworkMessage { impl RawNetworkMessage {
fn command(&self) -> String { /// Return the message command. This is useful for debug outputs.
pub fn command(&self) -> String {
match self.payload { match self.payload {
NetworkMessage::Version(_) => "version", NetworkMessage::Version(_) => "version",
NetworkMessage::Verack => "verack", NetworkMessage::Verack => "verack",