mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Simple Subnet Management (#6146)
* Initial temp commit * Merge latest unstable * First draft without tests * Update tests for new version * Correct comments and reviewers comments * Merge latest unstable * Fix errors * Missed a comment, corrected it * Fix lints * Merge latest unstable * Fix tests * Merge latest unstable * Reviewers comments * Remove sync subnets from ENR on unsubscribe * Merge branch 'unstable' into simple-peer-mapping * Merge branch 'unstable' into simple-peer-mapping * Merge branch 'unstable' into simple-peer-mapping * Merge latest unstable * Prevent clash with pin of rust_eth_kzg
This commit is contained in:
@@ -169,21 +169,18 @@ mod tests {
|
||||
// Subscribe to the topics.
|
||||
runtime.block_on(async {
|
||||
while network_globals.gossipsub_subscriptions.read().len() < 2 {
|
||||
if let Some(msg) = network_service.attestation_service.next().await {
|
||||
network_service.on_attestation_service_msg(msg);
|
||||
if let Some(msg) = network_service.subnet_service.next().await {
|
||||
network_service.on_subnet_service_msg(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Make sure the service is subscribed to the topics.
|
||||
let (old_topic1, old_topic2) = {
|
||||
let mut subnets = SubnetId::compute_subnets_for_epoch::<MinimalEthSpec>(
|
||||
let mut subnets = SubnetId::compute_attestation_subnets(
|
||||
network_globals.local_enr().node_id().raw(),
|
||||
beacon_chain.epoch().unwrap(),
|
||||
&spec,
|
||||
)
|
||||
.unwrap()
|
||||
.0
|
||||
.collect::<Vec<_>>();
|
||||
assert_eq!(2, subnets.len());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user