diff --git a/src/cluster_info.rs b/src/cluster_info.rs index f13e402fa2..9ba5604bdc 100644 --- a/src/cluster_info.rs +++ b/src/cluster_info.rs @@ -17,6 +17,7 @@ use bloom::Bloom; use contact_info::ContactInfo; use counter::Counter; use crds_gossip::CrdsGossip; +use crds_gossip_error::CrdsGossipError; use crds_gossip_pull::CRDS_GOSSIP_PULL_CRDS_TIMEOUT_MS; use crds_value::{CrdsValue, CrdsValueLabel, LeaderId}; use ledger::LedgerWindow; @@ -898,16 +899,22 @@ impl ClusterInfo { if data.verify() { inc_new_counter_info!("cluster_info-prune_message", 1); inc_new_counter_info!("cluster_info-prune_message-size", data.prunes.len()); - me.write() - .unwrap() - .gossip - .process_prune_msg( - from, - data.destination, - &data.prunes, - data.wallclock, - timestamp(), - ).ok(); + match me.write().unwrap().gossip.process_prune_msg( + from, + data.destination, + &data.prunes, + data.wallclock, + timestamp(), + ) { + Err(CrdsGossipError::PruneMessageTimeout) => { + inc_new_counter_info!("cluster_info-prune_message_timeout", 1) + } + Err(CrdsGossipError::BadPruneDestination) => { + inc_new_counter_info!("cluster_info-bad_prune_destination", 1) + } + Err(_) => (), + Ok(_) => (), + } } vec![] }