Remove purging of leader id from cluster info (#1642)

This commit is contained in:
carllin 2018-10-31 12:30:48 -07:00 committed by GitHub
parent db98f7e0b4
commit 47f1fa3f2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -413,7 +413,6 @@ impl ClusterInfo {
if *id == leader_id {
info!("{}: PURGE LEADER {}", self.id, id,);
inc_new_counter_info!("cluster_info-purge-purged_leader", 1, 1);
self.set_leader(Pubkey::default());
}
}
}
@ -1667,7 +1666,7 @@ mod tests {
let len = cluster_info.table.len() as u64;
cluster_info.purge(now + GOSSIP_PURGE_MILLIS + 1);
assert_eq!(len as usize - 1, cluster_info.table.len());
assert_eq!(cluster_info.my_data().leader_id, Pubkey::default());
assert_eq!(cluster_info.my_data().leader_id, nxt.id);
assert!(cluster_info.leader_data().is_none());
}