mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 21:38:31 +00:00
Make CGC queries dependant on the block slot
This commit is contained in:
@@ -16,6 +16,7 @@ use strum::AsRefStr;
|
||||
use strum::IntoEnumIterator;
|
||||
use types::DataColumnSubnetId;
|
||||
use types::EthSpec;
|
||||
use types::Slot;
|
||||
|
||||
pub const SUCCESS: &str = "SUCCESS";
|
||||
pub const FAILURE: &str = "FAILURE";
|
||||
@@ -742,7 +743,7 @@ pub fn update_gossip_metrics<E: EthSpec>(
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_sync_metrics<E: EthSpec>(network_globals: &Arc<NetworkGlobals<E>>) {
|
||||
pub fn update_sync_metrics<E: EthSpec>(network_globals: &Arc<NetworkGlobals<E>>, clock_slot: Slot) {
|
||||
// reset the counts
|
||||
if PEERS_PER_SYNC_TYPE
|
||||
.as_ref()
|
||||
@@ -771,7 +772,7 @@ pub fn update_sync_metrics<E: EthSpec>(network_globals: &Arc<NetworkGlobals<E>>)
|
||||
|
||||
let all_column_subnets =
|
||||
(0..network_globals.spec.data_column_sidecar_subnet_count).map(DataColumnSubnetId::new);
|
||||
let custody_column_subnets = network_globals.sampling_subnets.iter();
|
||||
let custody_column_subnets = network_globals.sampling_subnets(clock_slot).iter();
|
||||
|
||||
// Iterate all subnet values to set to zero the empty entries in peers_per_column_subnet
|
||||
for subnet in all_column_subnets {
|
||||
|
||||
Reference in New Issue
Block a user