File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
beacon_node/network/src/subnet_service Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -477,8 +477,16 @@ impl<T: BeaconChainTypes> AttestationService<T> {
477
477
time_to_subscription_slot. saturating_sub ( advance_subscription_duration)
478
478
} ;
479
479
480
+ let mut time_to_subscription_slot = self
481
+ . beacon_chain
482
+ . slot_clock
483
+ . duration_to_slot ( slot)
484
+ . unwrap_or_default ( ) ; // If this is a past slot we will just get a 0 duration.
485
+
486
+ time_to_subscription_slot += slot_duration * 2 ;
487
+
480
488
if let Some ( tracked_vals) = self . aggregate_validators_on_subnet . as_mut ( ) {
481
- tracked_vals. insert ( ExactSubnet { subnet_id, slot } ) ;
489
+ tracked_vals. insert_at ( ExactSubnet { subnet_id, slot } , time_to_subscription_slot ) ;
482
490
}
483
491
484
492
// If the subscription should be done in the future, schedule it. Otherwise subscribe
You can’t perform that action at this time.
0 commit comments