Skip to content

Commit

Permalink
Merge pull request #95 from renproject/feat/timeout-type
Browse files Browse the repository at this point in the history
Timeout message type
  • Loading branch information
loongy authored Dec 11, 2020
2 parents 58e3f1e + 7894b69 commit 21f6797
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions process/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,25 @@ const (
MessageTypePropose MessageType = 1
MessageTypePrevote MessageType = 2
MessageTypePrecommit MessageType = 3
MessageTypeTimeout MessageType = 4
)

// String implements the Stringer interface.
func (ty MessageType) String() string {
switch ty {
case MessageTypePropose:
return "Propose"
case MessageTypePrevote:
return "Prevote"
case MessageTypePrecommit:
return "Precommit"
case MessageTypeTimeout:
return "Timeout"
default:
return "Unknown"
}
}

// A Propose message is sent by the proposer Process at most once per Round. The
// Scheduler interfaces determines which Process is the proposer at any given
// Height and Round.
Expand Down

0 comments on commit 21f6797

Please sign in to comment.