The highest tagged major version is
v2.
package
Version:
v0.9.0-build1
Opens a new window with list of versions in this module.
Published: Dec 24, 2018
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
Documentation
¶
Equal reports whether s1 has the same index as s2 or not.
Init initilizes various slot parameters
IsNextTo reports whether s1 corrensponds to the slot next to s2.
LessEqual reports whehter s1.nextIndex is less than or equal to s2.nextIndex
Slot is a DPoS slot implmentation.
NewFromUnixNano returns a Slot corresponding to a UNIX time value (ns).
Now returns a Slot corresponding to the current local time.
Time returns a Slot corresponting to the given time.
GetBpTimeout returns the time available for block production.
IsFor reports whether s correponds to myBpIdx (block producer index).
IsValidNow reports whether the Slot is still valid at the time when it's
called.
NextBpIndex returns BP index for s.nextIndex.
RemainingTimeMS returns the remaining duration until the next block
generation time.
TimesUp reports whether the reminaing time <= BpMinTimeLimitMs
UnixNano returns UNIX time in ns.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.