diff --git a/qbft/controller.go b/qbft/controller.go index a0b6e96df..58785f0fc 100644 --- a/qbft/controller.go +++ b/qbft/controller.go @@ -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") }