MCPcopy Create free account
hub / github.com/DNAProject/DNA / SerializeVbftMsg

Function SerializeVbftMsg

consensus/vbft/msg_builder.go:126–138  ·  view source on GitHub ↗
(msg ConsensusMsg)

Source from the content-addressed store, hash-verified

124}
125
126func SerializeVbftMsg(msg ConsensusMsg) ([]byte, error) {
127
128 payload, err := msg.Serialize()
129 if err != nil {
130 return nil, err
131 }
132
133 return json.Marshal(&ConsensusMsgPayload{
134 Type: msg.Type(),
135 Len: uint32(len(payload)),
136 Payload: payload,
137 })
138}
139
140func (self *Server) constructHandshakeMsg() (*peerHandshakeMsg, error) {
141

Callers 4

TestSerializeVbftMsgFunction · 0.85
TestDeserializeVbftMsgFunction · 0.85
HashMsgFunction · 0.85
msgSendLoopMethod · 0.85

Calls 3

MarshalMethod · 0.80
SerializeMethod · 0.65
TypeMethod · 0.65

Tested by 2

TestSerializeVbftMsgFunction · 0.68
TestDeserializeVbftMsgFunction · 0.68