Deneb review suggestions (#4678)

* Increase resolution for single lookup delay

* Remove code duplication

* Remove trusted setup code duplication
This commit is contained in:
Paul Hauner
2023-09-06 05:49:11 +10:00
committed by GitHub
parent 5ea38d90cc
commit e783a40e01
2 changed files with 21 additions and 36 deletions

View File

@@ -835,9 +835,9 @@ impl<T: BeaconChainTypes> SyncManager<T> {
let delay_threshold_unmet = self
.chain
.slot_clock
.seconds_from_current_slot_start()
.map_or(false, |secs_into_slot| {
secs_into_slot < self.chain.slot_clock.single_lookup_delay()
.millis_from_current_slot_start()
.map_or(false, |millis_into_slot| {
millis_into_slot < self.chain.slot_clock.single_lookup_delay()
});
msg_for_current_slot && delay_threshold_unmet
} else {