-
Notifications
You must be signed in to change notification settings - Fork 780
Open
Labels
P:tech-debtPriority: Technical debt that needs to be paid off to enable us to move faster, reliablyPriority: Technical debt that needs to be paid off to enable us to move faster, reliablyhygieneAny work relating to code legibility/hygiene to make it easier to readAny work relating to code legibility/hygiene to make it easier to read
Description
A Proposal with height 0 is considered valid, see:
Lines 53 to 55 in 9613e7a
| if p.Height < 0 { | |
| return errors.New("negative Height") | |
| } |
The associated test unit only tests height -1, see:
cometbft/types/proposal_test.go
Line 136 in 9613e7a
| {"Invalid Height", func(p *Proposal) { p.Height = -1 }, true}, |
But as @sergio-mena pointed out in #2206 (comment):
I checked the validation function and it's true it allows for height 0, but is it a bug? I searched around and never saw the height being set to 0, neither in production nor in tests (maybe I missed it)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P:tech-debtPriority: Technical debt that needs to be paid off to enable us to move faster, reliablyPriority: Technical debt that needs to be paid off to enable us to move faster, reliablyhygieneAny work relating to code legibility/hygiene to make it easier to readAny work relating to code legibility/hygiene to make it easier to read