Documentation ¶
Index ¶
- func BpMaxTime() time.Duration
- func Equal(s1, s2 *Slot) bool
- func Init(blockIntervalSec int64)
- func IsNextTo(s1, s2 *Slot) bool
- func LessEqual(s1, s2 *Slot) bool
- type Slot
- func (s *Slot) GetBpTimeout() int64
- func (s *Slot) IsFor(bpIdx bp.Index, bpCount uint16) bool
- func (s *Slot) IsFuture() bool
- func (s *Slot) IsValidNow() bool
- func (s *Slot) NextBpIndex(bpCount uint16) int64
- func (s *Slot) RemainingTimeMS() int64
- func (s Slot) TimesUp() bool
- func (s *Slot) UnixNano() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Slot ¶
type Slot struct {
// contains filtered or unexported fields
}
Slot is a DPoS slot implementation.
func NewFromUnixNano ¶
NewFromUnixNano returns a Slot corresponding to a UNIX time value (ns).
func (*Slot) GetBpTimeout ¶
GetBpTimeout returns the time available for block production in milliseconds.
func (*Slot) IsValidNow ¶
IsValidNow reports whether s is still valid at the time when it's called.
func (*Slot) NextBpIndex ¶
NextBpIndex returns BP index for s.nextIndex.
func (*Slot) RemainingTimeMS ¶
RemainingTimeMS returns the remaining duration until the next block generation time.
Click to show internal directories.
Click to hide internal directories.