Skip to content

Commit

Permalink
fix slot underflow in check_consensus_slot_range task
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Apr 3, 2024
1 parent 8152ced commit 7c7c1a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/coordinator/tasks/check_consensus_slot_range/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ func (t *Task) Execute(ctx context.Context) error {

func (t *Task) runRangeCheck() (checkResult, isLower bool) {
consensusPool := t.ctx.Scheduler.GetServices().ClientPool().GetConsensusPool()
if consensusPool.GetBlockCache().GetGenesis().GenesisTime.Compare(time.Now()) >= 0 {
return false, true
}

currentSlot, currentEpoch, err := consensusPool.GetBlockCache().GetWallclock().Now()
if err != nil {
Expand Down

0 comments on commit 7c7c1a8

Please sign in to comment.