Skip to content

Commit

Permalink
Fix MessageCounts check
Browse files Browse the repository at this point in the history
  • Loading branch information
MatheusFranco99 committed Aug 22, 2024
1 parent e7b9cfa commit 4b1021d
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 4b1021d

Please sign in to comment.