Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SlotTicker ¶
type SlotTicker struct {
// contains filtered or unexported fields
}
SlotTicker is a special ticker for the beacon chain block. The channel emits over the slot interval, and ensures that the ticks are in line with the genesis time. This means that the duration between the ticks and the genesis time are always a multiple of the slot duration. In addition, the channel returns the new slot number.
func GetSlotTicker ¶
func GetSlotTicker(genesisTime time.Time, secondsPerSlot uint64) *SlotTicker
GetSlotTicker is the constructor for SlotTicker.
func (*SlotTicker) C ¶
func (s *SlotTicker) C() <-chan uint64
C returns the ticker channel. Call Cancel afterwards to ensure that the goroutine exits cleanly.
Click to show internal directories.
Click to hide internal directories.