Revision ca00cd6a78be56884873257ed4bd5f61f3210d5b authored by Thane Thomson on 15 January 2019, 08:14:41 UTC, committed by Thane Thomson on 15 January 2019, 08:14:41 UTC
This cuts out two tests by constructing test cases and iterating through them, rather than having separate sets of tests for TCP and Unix listeners. This is as per the feedback from #3121.
1 parent 5f93220
signed_msg_type.go
package types
// SignedMsgType is a type of signed message in the consensus.
type SignedMsgType byte
const (
// Votes
PrevoteType SignedMsgType = 0x01
PrecommitType SignedMsgType = 0x02
// Proposals
ProposalType SignedMsgType = 0x20
)
// IsVoteTypeValid returns true if t is a valid vote type.
func IsVoteTypeValid(t SignedMsgType) bool {
switch t {
case PrevoteType, PrecommitType:
return true
default:
return false
}
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...