mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Add sync lookup custody request state (#6257)
* Add sync lookup custody request state * Review PR * clippy * Merge branch 'unstable' of https://github.com/sigp/lighthouse into peerdas-network-lookup
This commit is contained in:
@@ -7,7 +7,7 @@ use crate::EnrExt;
|
||||
use crate::{Enr, GossipTopic, Multiaddr, PeerId};
|
||||
use parking_lot::RwLock;
|
||||
use std::collections::HashSet;
|
||||
use types::EthSpec;
|
||||
use types::{ChainSpec, ColumnIndex, EthSpec};
|
||||
|
||||
pub struct NetworkGlobals<E: EthSpec> {
|
||||
/// The current local ENR.
|
||||
@@ -110,6 +110,13 @@ impl<E: EthSpec> NetworkGlobals<E> {
|
||||
std::mem::replace(&mut *self.sync_state.write(), new_state)
|
||||
}
|
||||
|
||||
/// Compute custody data columns the node is assigned to custody.
|
||||
pub fn custody_columns(&self, _spec: &ChainSpec) -> Vec<ColumnIndex> {
|
||||
let _enr = self.local_enr();
|
||||
//TODO(das): implement ENR changes
|
||||
vec![]
|
||||
}
|
||||
|
||||
/// TESTING ONLY. Build a dummy NetworkGlobals instance.
|
||||
pub fn new_test_globals(trusted_peers: Vec<PeerId>, log: &slog::Logger) -> NetworkGlobals<E> {
|
||||
use crate::CombinedKeyExt;
|
||||
|
||||
Reference in New Issue
Block a user