ToProto converts Data to protobuf
()
| 1033 | |
| 1034 | // ToProto converts Data to protobuf |
| 1035 | func (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. |
no outgoing calls
no test coverage detected