diff --git a/cmd/broadcast/utils.go b/cmd/broadcast/utils.go index 23a649f..56c8093 100644 --- a/cmd/broadcast/utils.go +++ b/cmd/broadcast/utils.go @@ -12,15 +12,18 @@ import ( "strings" ) +// Role is the role of the node, has 3 roles: self, neighbor, all type Role int +// Node roles const ( - Self Role = 0 - Neighbor Role = 1 - All Role = 2 - pubKeySize int = 20 + Self Role = 0 + Neighbor Role = 1 + All Role = 2 ) +const pubKeySize int = 20 + // PeerConfig is a single config of a node. type PeerConfig struct { Sid string // SimpleID, might be replaced later for more generic ID like byte array