MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / ToProto

Method ToProto

types/block.go:1035–1047  ·  view source on GitHub ↗

ToProto converts Data to protobuf

()

Source from the content-addressed store, hash-verified

1033
1034// ToProto converts Data to protobuf
1035func (data *Data) ToProto() tmproto.Data {
1036 tp := new(tmproto.Data)
1037
1038 if len(data.Txs) > 0 {
1039 txBzs := make([][]byte, len(data.Txs))
1040 for i := range data.Txs {
1041 txBzs[i] = data.Txs[i]
1042 }
1043 tp.Txs = txBzs
1044 }
1045
1046 return *tp
1047}
1048
1049// DataFromProto takes a protobuf representation of Data &
1050// returns the native type.

Callers 9

ComputeProtoSizeForTxsFunction · 0.95
ToProtoMethod · 0.45
HashMethod · 0.45
ToProtoMethod · 0.45
VoteSignBytesMethod · 0.45
HashMethod · 0.45
ToProtoMethod · 0.45
KeyMethod · 0.45
ToProtoMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected