Fix node count metrics (#3997)

- the count was truncated to avalanche neighborhood size
This commit is contained in:
Pankaj Garg 2019-04-25 13:47:38 -07:00 committed by GitHub
parent e4536621df
commit 15aa07f2a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -77,10 +77,10 @@ impl Broadcast {
let mut broadcast_table = cluster_info.read().unwrap().sorted_tvu_peers(
&staking_utils::delegated_stakes_at_epoch(&bank, bank_epoch).unwrap(),
);
inc_new_counter_info!("broadcast_service-num_peers", broadcast_table.len() + 1);
// Layer 1, leader nodes are limited to the fanout size.
broadcast_table.truncate(NEIGHBORHOOD_SIZE);
inc_new_counter_info!("broadcast_service-num_peers", broadcast_table.len() + 1);
inc_new_counter_info!("broadcast_service-entries_received", num_entries);
let to_blobs_start = Instant::now();