aboutsummaryrefslogtreecommitdiff
path: root/p2p
diff options
context:
space:
mode:
Diffstat (limited to 'p2p')
-rw-r--r--p2p/src/message.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/p2p/src/message.rs b/p2p/src/message.rs
index 833f6f4..cdb9837 100644
--- a/p2p/src/message.rs
+++ b/p2p/src/message.rs
@@ -99,11 +99,14 @@ pub struct PeerMsg {
pub struct PeersMsg(pub Vec<PeerMsg>);
macro_rules! get_msg_payload {
- ($a:ident, $b:expr) => {
+ ($a:ident, $b:ident) => {
if let NetMsgCmd::$a = $b.header.command {
$b.payload
} else {
- return Err(Error::InvalidMsg(format!("Unexpected msg{:?}", $b)));
+ return Err(Error::InvalidMsg(format!(
+ "Unexpected msg {:?}",
+ $b.header.command
+ )));
}
};
}