Skip to content

Commit

Permalink
*: fix exhaustive warnings
Browse files Browse the repository at this point in the history
helpers.go:50:2                              exhaustive  missing cases in switch of type dbft.MessageType: dbft.RecoveryRequestType, dbft.RecoveryMessageType
internal/consensus/recovery_message.go:39:2  exhaustive  missing cases in switch of type dbft.MessageType: dbft.RecoveryRequestType, dbft.RecoveryMessageType

Signed-off-by: Roman Khimov <[email protected]>
  • Loading branch information
roman-khimov committed Sep 10, 2024
1 parent 1fd6aa8 commit aab1cf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,8 @@ func (c *cache[H]) addMessage(m ConsensusPayload[H]) {
msgs.preCommit[m.ValidatorIndex()] = m
case CommitType:
msgs.commit[m.ValidatorIndex()] = m
default:

Check warning on line 59 in helpers.go

View check run for this annotation

Codecov / codecov/patch

helpers.go#L59

Added line #L59 was not covered by tests
// Others are recoveries and we don't currently use them.
// Theoretically messages could be extracted.
}
}
2 changes: 2 additions & 0 deletions internal/consensus/recovery_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ func (m *recoveryMessage) AddPayload(p dbft.ConsensusPayload[crypto.Uint256]) {
}
copy(cc.Signature[:], p.GetCommit().Signature())
m.commitPayloads = append(m.commitPayloads, cc)
default:

Check warning on line 68 in internal/consensus/recovery_message.go

View check run for this annotation

Codecov / codecov/patch

internal/consensus/recovery_message.go#L68

Added line #L68 was not covered by tests
// Other types (recoveries) can't be packed into recovery.
}
}

Expand Down

0 comments on commit aab1cf6

Please sign in to comment.