status-go/vendor/github.com/vacp2p/mvds/protobuf/payload.go

8 lines
205 B
Go
Raw Normal View History

package protobuf
// IsValid checks whether there are any known field in the protobuf
// message
func (m *Payload) IsValid() bool {
return len(m.Messages)+len(m.Acks)+len(m.Offers)+len(m.Requests) != 0
}