Surface the spy node's id, useful for log analysis
This commit is contained in:
parent
58bca04a3f
commit
56fa3a09c8
|
@ -36,6 +36,7 @@ fn converge(
|
||||||
) -> (Vec<NodeInfo>, Option<NodeInfo>, GossipService) {
|
) -> (Vec<NodeInfo>, Option<NodeInfo>, GossipService) {
|
||||||
//lets spy on the network
|
//lets spy on the network
|
||||||
let (node, gossip_socket) = ClusterInfo::spy_node();
|
let (node, gossip_socket) = ClusterInfo::spy_node();
|
||||||
|
println!("Spy node: {}", node.id);
|
||||||
let mut spy_cluster_info = ClusterInfo::new(node);
|
let mut spy_cluster_info = ClusterInfo::new(node);
|
||||||
spy_cluster_info.insert_info(leader.clone());
|
spy_cluster_info.insert_info(leader.clone());
|
||||||
spy_cluster_info.set_leader(leader.id);
|
spy_cluster_info.set_leader(leader.id);
|
||||||
|
|
Loading…
Reference in New Issue