MCPcopy Create free account
hub / github.com/tendermint/tendermint / ToProto

Method ToProto

types/light.go:179–193  ·  view source on GitHub ↗

ToProto converts SignedHeader to protobuf

()

Source from the content-addressed store, hash-verified

177
178// ToProto converts SignedHeader to protobuf
179func (sh *SignedHeader) ToProto() *tmproto.SignedHeader {
180 if sh == nil {
181 return nil
182 }
183
184 psh := new(tmproto.SignedHeader)
185 if sh.Header != nil {
186 psh.Header = sh.Header.ToProto()
187 }
188 if sh.Commit != nil {
189 psh.Commit = sh.Commit.ToProto()
190 }
191
192 return psh
193}
194
195// FromProto sets a protobuf SignedHeader to the given pointer.
196// It returns an error if the header or the commit is invalid.

Callers

nothing calls this directly

Calls 1

ToProtoMethod · 0.45

Tested by

no test coverage detected