add delay before broadcasting lc objects (#15776)

* add delay before broadcasting lc objects

* address commments

* address commments

* reduce test runtime
This commit is contained in:
Bastin
2025-10-03 15:02:46 +02:00
committed by GitHub
parent 1f89394727
commit 28eb1a4c3c
16 changed files with 117 additions and 27 deletions

View File

@@ -307,3 +307,9 @@ func SecondsUntilNextEpochStart(genesis time.Time) (uint64, error) {
}).Debugf("%d seconds until next epoch", waitTime)
return waitTime, nil
}
// ComponentDuration calculates the duration of a slot component in milliseconds.
func ComponentDuration(component primitives.BP) time.Duration {
ms := (component * params.SlotBP()) / params.BasisPoints
return time.Duration(ms) * time.Millisecond
}