From 748588e3f0d7e4c3b9a550732907dc5bb05e4272 Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Thu, 30 Jun 2022 17:20:26 +0900 Subject: [PATCH] protocols/gossipsub: Fix a typo in error message (#2739) * protocols/gossipsub: Fix a typo in error message * protocols/gossipsub: Make the error message accurately --- protocols/gossipsub/src/behaviour.rs | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/protocols/gossipsub/src/behaviour.rs b/protocols/gossipsub/src/behaviour.rs index ea8bd73b89a..92bef2fe4b6 100644 --- a/protocols/gossipsub/src/behaviour.rs +++ b/protocols/gossipsub/src/behaviour.rs @@ -1516,19 +1516,16 @@ where peer_id ); - if self - .send_message( - *peer_id, - GossipsubRpc { - subscriptions: Vec::new(), - messages: Vec::new(), - control_msgs: prune_messages, - } - .into_protobuf(), - ) - .is_err() - { - error!("Failed to send graft. Message too large"); + if let Err(e) = self.send_message( + *peer_id, + GossipsubRpc { + subscriptions: Vec::new(), + messages: Vec::new(), + control_msgs: prune_messages, + } + .into_protobuf(), + ) { + error!("Failed to send PRUNE: {:?}", e); } } debug!("Completed GRAFT handling for peer: {}", peer_id);