You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
307 B

  1. package types
  2. import tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
  3. // IsVoteTypeValid returns true if t is a valid vote type.
  4. func IsVoteTypeValid(t tmproto.SignedMsgType) bool {
  5. switch t {
  6. case tmproto.PrevoteType, tmproto.PrecommitType:
  7. return true
  8. default:
  9. return false
  10. }
  11. }