Skip to content

Commit

Permalink
fix comments (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
GalRogozinski authored Aug 1, 2023
1 parent c41e52c commit 8b61509
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qbft/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ func (c *Controller) StartNewInstance(height Height, value []byte) error {
return errors.Wrap(err, "value invalid")
}

// can't use <= because of height == 0 case
if height < c.Height {
return errors.New("attempting to start an instance with a past height")
}

// only if current height's instance exists (and decided since passed can start instance) bump
// covers height == 0 case
if c.StoredInstances.FindInstance(height) != nil {
return errors.New("instance already running")
}
Expand Down

0 comments on commit 8b61509

Please sign in to comment.