protogen

package
v0.5.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UnknownProtoMsgType is an unknown message type that is not expected
	UnknownProtoMsgType uint32 = 0
	// MsgTxProtoMsgType is for transactions broadcasted within the network
	MsgTxProtoMsgType uint32 = 1
	// MsgBlockProtoMsgType is for blocks broadcasted within the network
	MsgBlockProtoMsgType uint32 = 2
	// MsgBlockSyncReqType is for requests among peers to sync blocks
	MsgBlockSyncReqType uint32 = 3
	// MsgBlockSyncDataType is the response to messages of type MsgBlockSyncReqType
	MsgBlockSyncDataType uint32 = 4
	// MsgActionType is the action message
	MsgActionType uint32 = 5
	// MsgConsensusType is for consensus message
	MsgConsensusType uint32 = 6
	// TestPayloadType is a test payload message type
	TestPayloadType uint32 = 10001
)
View Source
const (
	MagicBroadcastMsgHeader uint32 = 4689
)

Magic header to identify IoTex traffic

Variables

This section is empty.

Functions

func GetTypeFromProtoMsg

func GetTypeFromProtoMsg(msg proto.Message) (uint32, error)

GetTypeFromProtoMsg retrieves the proto message type

func TypifyProtoMsg

func TypifyProtoMsg(tp uint32, msg []byte) (proto.Message, error)

TypifyProtoMsg unmarshal a proto message based on the given MessageType

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL