Library to compute rounds and phases for an equal length commit-reveal voting cycle.
Initializes the data object. Sets the phase length based on the input and resets the round id and round start time to 1 and 0 respectively.
This method should generally only be run once, but it can also be used to reset the data structure to its initial values.
Gets the most recently stored round ID set by updateRoundId().
Determines whether time has advanced far enough to advance to the next voting round and update the stored round id.
Updates the round id. Note: if shouldUpdateRoundId() returns false, this method will have no effect.
Computes what the stored round id would be if it were updated right now, but this method does not commit the update.
computeCurrentPhase(struct VoteTiming.Data data, uint256 currentTime) → enum VoteTiming.Phase internal
Computes the current phase based only on the current time.