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

Method Serialize

consensus/vbft/config/config.go:95–104  ·  view source on GitHub ↗

Serialize the ChainConfig

(w io.Writer)

Source from the content-addressed store, hash-verified

93
94//Serialize the ChainConfig
95func (cc *ChainConfig) Serialize(w io.Writer) error {
96 data, err := json.Marshal(cc)
97 if err != nil {
98 return err
99 }
100 if _, err := w.Write(data); err != nil {
101 return err
102 }
103 return nil
104}
105
106func (pc *PeerConfig) Serialization(sink *common.ZeroCopySink) {
107 sink.WriteUint32(pc.Index)

Callers 2

generTestDataFunction · 0.95
HashMethod · 0.95

Calls 2

MarshalMethod · 0.80
WriteMethod · 0.80

Tested by 1

generTestDataFunction · 0.76