Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ProtocolVersion is a constant defined as the version of the Harmony protocol ProtocolVersion = 1 // MessageCategoryBytes is the number of bytes message category takes MessageCategoryBytes = 1 // MessageTypeBytes is the number of bytes message type takes MessageTypeBytes = 1 )
Variables ¶
This section is empty.
Functions ¶
func ConstructConsensusMessage ¶
ConstructConsensusMessage creates a message with the payload and returns as byte array.
func GetConsensusMessagePayload ¶
GetConsensusMessagePayload gets the consensus message payload from the p2p message content
func GetMessagePayload ¶
GetMessagePayload gets the node message payload from the p2p message content
func GetMessageType ¶
GetMessageType gets the message type from the p2p message content
Types ¶
type MessageCategory ¶
type MessageCategory byte
MessageCategory defines the message category enum
const ( Consensus MessageCategory = iota Node Client // deprecated DRand // not used )
Consensus and other message categories
func GetMessageCategory ¶
func GetMessageCategory(message []byte) (MessageCategory, error)
GetMessageCategory gets the message category from the p2p message content
Click to show internal directories.
Click to hide internal directories.