From db768b4c3ad18ce3cadc93f4a96a83706c77d744 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Mon, 26 Aug 2019 18:31:14 -0700 Subject: [PATCH] Log contact info every 10 seconds (#5663) --- core/src/cluster_info.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/cluster_info.rs b/core/src/cluster_info.rs index e06c4c0ce7..533b33a824 100644 --- a/core/src/cluster_info.rs +++ b/core/src/cluster_info.rs @@ -999,8 +999,15 @@ impl ClusterInfo { .name("solana-gossip".to_string()) .spawn(move || { let mut last_push = timestamp(); + let mut last_contact_info_trace = timestamp(); loop { let start = timestamp(); + if start - last_contact_info_trace > 10000 { + // Log contact info every 10 seconds + info!("{}", obj.read().unwrap().contact_info_trace()); + last_contact_info_trace = start; + } + let stakes: HashMap<_, _> = match bank_forks { Some(ref bank_forks) => { staking_utils::staked_nodes(&bank_forks.read().unwrap().working_bank())