From 8b61509a0c443add889479b54005dd3087574a96 Mon Sep 17 00:00:00 2001 From: Gal Rogozinski Date: Tue, 1 Aug 2023 15:29:05 +0300 Subject: [PATCH] fix comments (#298) --- qbft/controller.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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") }