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

Method UnmarshalJSON

consensus/vbft/msg_types.go:113–121  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

111}
112
113func (msg *blockProposalMsg) UnmarshalJSON(data []byte) error {
114 blk := &Block{}
115 if err := blk.Deserialize(data); err != nil {
116 return err
117 }
118
119 msg.Block = blk
120 return nil
121}
122
123func (msg *blockProposalMsg) MarshalJSON() ([]byte, error) {
124 return msg.Block.Serialize(), nil

Callers 1

DeserializeVbftMsgFunction · 0.45

Calls 1

DeserializeMethod · 0.95

Tested by

no test coverage detected