feat: Improved debug messages for block ids

This commit is contained in:
Nicholas Novak 2023-12-11 00:23:53 -08:00
parent 0d6ff2cf96
commit f2943c6809

View File

@ -49,3 +49,14 @@ const (
Empty BlockID = iota
Generic
)
func (id BlockID) String() string {
switch id {
case Empty:
return "Empty"
case Generic:
return "Generic"
default:
panic(fmt.Sprintf("Unknown block id: %v", uint8(id)))
}
}