mirror of
https://github.com/luxfi/consensus.git
synced 2026-10-30 14:45:53 +00:00
28 lines
411 B
Go
28 lines
411 B
Go
package choices
|
|
|
|
// Status represents the status of a block
|
|
type Status uint8
|
|
|
|
const (
|
|
Unknown Status = iota
|
|
Processing
|
|
Rejected
|
|
Accepted
|
|
)
|
|
|
|
// String returns string representation
|
|
func (s Status) String() string {
|
|
switch s {
|
|
case Unknown:
|
|
return "Unknown"
|
|
case Processing:
|
|
return "Processing"
|
|
case Rejected:
|
|
return "Rejected"
|
|
case Accepted:
|
|
return "Accepted"
|
|
default:
|
|
return "Invalid"
|
|
}
|
|
}
|