Skip to content

Commit

Permalink
fix validation for UpdateOperatorsMessage
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
  • Loading branch information
bluele committed Jun 17, 2024
1 parent 3c28b50 commit 74087d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions light-clients/lcp/types/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ func (m UpdateOperatorsMessage) ValidateBasic() error {
if m.NewOperatorsThresholdDenominator == 0 {
return fmt.Errorf("new operators threshold denominator cannot be zero")
}
if m.NewOperatorsThresholdNumerator > m.NewOperatorsThresholdDenominator {
return fmt.Errorf("new operators threshold numerator cannot be greater than denominator")
}
if len(m.Signatures) == 0 {
return fmt.Errorf("signatures cannot be empty")
}
Expand Down

0 comments on commit 74087d4

Please # to comment.