github.com/vipernet-xyz/tm@v0.34.24/types/signed_msg_type.go (about)

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