Skip to content

Commit

Permalink
fix: (validation) MessageCounts check
Browse files Browse the repository at this point in the history
  • Loading branch information
MatheusFranco99 authored and nkryuchkov committed Aug 22, 2024
1 parent e7ebecf commit 8c189c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions message/validation/message_counts.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ func (c *MessageCounts) ValidateConsensusMessage(signedSSVMessage *spectypes.Sig
func (c *MessageCounts) ValidatePartialSignatureMessage(m *spectypes.PartialSignatureMessages, limits MessageCounts) error {
switch m.Type {
case spectypes.RandaoPartialSig, spectypes.SelectionProofPartialSig, spectypes.ContributionProofs, spectypes.ValidatorRegistrationPartialSig, spectypes.VoluntaryExitPartialSig:
if c.PreConsensus > limits.PreConsensus {
if c.PreConsensus >= limits.PreConsensus {
err := ErrInvalidPartialSignatureTypeCount
err.got = fmt.Sprintf("pre-consensus, having %v", c.String())
return err
}
case spectypes.PostConsensusPartialSig:
if c.PostConsensus > limits.PostConsensus {
if c.PostConsensus >= limits.PostConsensus {
err := ErrInvalidPartialSignatureTypeCount
err.got = fmt.Sprintf("post-consensus, having %v", c.String())
return err
Expand Down

0 comments on commit 8c189c6

Please sign in to comment.