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

Method Serialization

consensus/dbft/prepare_request.go:41–50  ·  view source on GitHub ↗
(sink *common.ZeroCopySink)

Source from the content-addressed store, hash-verified

39}
40
41func (pr *PrepareRequest) Serialization(sink *common.ZeroCopySink) {
42 pr.msgData.Serialization(sink)
43 sink.WriteVarUint(pr.Nonce)
44 sink.WriteAddress(pr.NextBookkeeper)
45 sink.WriteVarUint(uint64(len(pr.Transactions)))
46 for _, t := range pr.Transactions {
47 t.Serialization(sink)
48 }
49 sink.WriteVarBytes(pr.Signature)
50}
51
52func (pr *PrepareRequest) Deserialization(source *common.ZeroCopySource) error {
53 pr.msgData = ConsensusMessageData{}

Callers

nothing calls this directly

Calls 4

WriteVarUintMethod · 0.80
WriteAddressMethod · 0.80
WriteVarBytesMethod · 0.80
SerializationMethod · 0.65

Tested by

no test coverage detected