2021-04-07 21:16:29 +00:00
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
2021-03-11 20:27:12 +00:00
|
|
|
// source: waku_message.proto
|
|
|
|
|
2021-04-22 00:09:37 +00:00
|
|
|
package pb
|
2021-03-11 20:27:12 +00:00
|
|
|
|
|
|
|
import (
|
2021-04-07 21:16:29 +00:00
|
|
|
encoding_binary "encoding/binary"
|
|
|
|
fmt "fmt"
|
2021-04-04 17:05:33 +00:00
|
|
|
proto "github.com/golang/protobuf/proto"
|
2021-04-07 21:16:29 +00:00
|
|
|
io "io"
|
|
|
|
math "math"
|
|
|
|
math_bits "math/bits"
|
2021-03-11 20:27:12 +00:00
|
|
|
)
|
|
|
|
|
2021-04-07 21:16:29 +00:00
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
2021-03-11 20:27:12 +00:00
|
|
|
|
2021-04-07 21:16:29 +00:00
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
2021-04-04 17:05:33 +00:00
|
|
|
|
2021-03-11 20:27:12 +00:00
|
|
|
type WakuMessage struct {
|
2021-04-07 21:16:29 +00:00
|
|
|
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
|
2021-04-08 22:07:31 +00:00
|
|
|
ContentTopic string `protobuf:"bytes,2,opt,name=contentTopic,proto3" json:"contentTopic,omitempty"`
|
2021-04-07 21:16:29 +00:00
|
|
|
Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
|
2021-04-08 18:49:03 +00:00
|
|
|
Timestamp float64 `protobuf:"fixed64,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
|
|
|
Proof []byte `protobuf:"bytes,21,opt,name=proof,proto3" json:"proof,omitempty"`
|
2021-04-07 21:16:29 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
|
|
|
|
2021-04-07 21:16:29 +00:00
|
|
|
func (m *WakuMessage) Reset() { *m = WakuMessage{} }
|
|
|
|
func (m *WakuMessage) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*WakuMessage) ProtoMessage() {}
|
|
|
|
func (*WakuMessage) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_6f0a20862b3bf714, []int{0}
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
2021-04-07 21:16:29 +00:00
|
|
|
func (m *WakuMessage) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
2021-04-07 21:16:29 +00:00
|
|
|
func (m *WakuMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_WakuMessage.Marshal(b, m, deterministic)
|
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
2021-04-07 21:16:29 +00:00
|
|
|
return b[:n], nil
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
|
|
|
}
|
2021-04-07 21:16:29 +00:00
|
|
|
func (m *WakuMessage) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_WakuMessage.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *WakuMessage) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *WakuMessage) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_WakuMessage.DiscardUnknown(m)
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
|
|
|
|
2021-04-07 21:16:29 +00:00
|
|
|
var xxx_messageInfo_WakuMessage proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *WakuMessage) GetPayload() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Payload
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-04-08 22:07:31 +00:00
|
|
|
func (m *WakuMessage) GetContentTopic() string {
|
2021-04-07 21:16:29 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.ContentTopic
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
2021-04-08 22:07:31 +00:00
|
|
|
return ""
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
|
|
|
|
2021-04-07 21:16:29 +00:00
|
|
|
func (m *WakuMessage) GetVersion() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Version
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2021-04-08 18:49:03 +00:00
|
|
|
func (m *WakuMessage) GetTimestamp() float64 {
|
2021-04-07 21:16:29 +00:00
|
|
|
if m != nil {
|
2021-04-08 18:49:03 +00:00
|
|
|
return m.Timestamp
|
2021-03-22 16:45:13 +00:00
|
|
|
}
|
2021-04-08 18:49:03 +00:00
|
|
|
return 0
|
2021-03-22 16:45:13 +00:00
|
|
|
}
|
|
|
|
|
2021-04-08 18:49:03 +00:00
|
|
|
func (m *WakuMessage) GetProof() []byte {
|
2021-04-07 21:16:29 +00:00
|
|
|
if m != nil {
|
2021-04-08 18:49:03 +00:00
|
|
|
return m.Proof
|
2021-04-04 17:05:33 +00:00
|
|
|
}
|
2021-04-08 18:49:03 +00:00
|
|
|
return nil
|
2021-04-04 17:05:33 +00:00
|
|
|
}
|
|
|
|
|
2021-04-07 21:16:29 +00:00
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*WakuMessage)(nil), "protocol.WakuMessage")
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
|
|
|
|
2021-04-07 21:16:29 +00:00
|
|
|
func init() { proto.RegisterFile("waku_message.proto", fileDescriptor_6f0a20862b3bf714) }
|
|
|
|
|
|
|
|
var fileDescriptor_6f0a20862b3bf714 = []byte{
|
2021-04-08 22:07:31 +00:00
|
|
|
// 186 bytes of a gzipped FileDescriptorProto
|
2021-04-07 21:16:29 +00:00
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2a, 0x4f, 0xcc, 0x2e,
|
|
|
|
0x8d, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2,
|
|
|
|
0x00, 0x53, 0xc9, 0xf9, 0x39, 0x4a, 0x33, 0x19, 0xb9, 0xb8, 0xc3, 0x13, 0xb3, 0x4b, 0x7d, 0x21,
|
|
|
|
0xf2, 0x42, 0x12, 0x5c, 0xec, 0x05, 0x89, 0x95, 0x39, 0xf9, 0x89, 0x29, 0x12, 0x8c, 0x0a, 0x8c,
|
|
|
|
0x1a, 0x3c, 0x41, 0x30, 0xae, 0x90, 0x12, 0x17, 0x4f, 0x72, 0x7e, 0x5e, 0x49, 0x6a, 0x5e, 0x49,
|
2021-04-08 22:07:31 +00:00
|
|
|
0x48, 0x7e, 0x41, 0x66, 0xb2, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x8a, 0x18, 0x48, 0x77,
|
|
|
|
0x59, 0x6a, 0x51, 0x71, 0x66, 0x7e, 0x9e, 0x04, 0xb3, 0x02, 0xa3, 0x06, 0x6f, 0x10, 0x8c, 0x2b,
|
|
|
|
0x24, 0xc3, 0xc5, 0x59, 0x92, 0x99, 0x9b, 0x5a, 0x5c, 0x92, 0x98, 0x5b, 0x20, 0xc1, 0xa2, 0xc0,
|
|
|
|
0xa8, 0xc1, 0x18, 0x84, 0x10, 0x10, 0x12, 0xe1, 0x62, 0x2d, 0x28, 0xca, 0xcf, 0x4f, 0x93, 0x10,
|
|
|
|
0x05, 0xdb, 0x09, 0xe1, 0x38, 0x09, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83,
|
|
|
|
0x47, 0x72, 0x8c, 0x33, 0x1e, 0xcb, 0x31, 0x24, 0xb1, 0x81, 0xdd, 0x6d, 0x0c, 0x08, 0x00, 0x00,
|
|
|
|
0xff, 0xff, 0xb0, 0xa0, 0x70, 0x06, 0xd4, 0x00, 0x00, 0x00,
|
2021-04-07 21:16:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *WakuMessage) Marshal() (dAtA []byte, err error) {
|
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *WakuMessage) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *WakuMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
|
i -= len(m.XXX_unrecognized)
|
|
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
|
|
}
|
|
|
|
if len(m.Proof) > 0 {
|
|
|
|
i -= len(m.Proof)
|
|
|
|
copy(dAtA[i:], m.Proof)
|
|
|
|
i = encodeVarintWakuMessage(dAtA, i, uint64(len(m.Proof)))
|
|
|
|
i--
|
2021-04-08 18:49:03 +00:00
|
|
|
dAtA[i] = 0x1
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0xaa
|
|
|
|
}
|
|
|
|
if m.Timestamp != 0 {
|
|
|
|
i -= 8
|
|
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Timestamp))))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x21
|
2021-04-07 21:16:29 +00:00
|
|
|
}
|
|
|
|
if m.Version != 0 {
|
|
|
|
i = encodeVarintWakuMessage(dAtA, i, uint64(m.Version))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x18
|
|
|
|
}
|
2021-04-08 22:07:31 +00:00
|
|
|
if len(m.ContentTopic) > 0 {
|
|
|
|
i -= len(m.ContentTopic)
|
|
|
|
copy(dAtA[i:], m.ContentTopic)
|
|
|
|
i = encodeVarintWakuMessage(dAtA, i, uint64(len(m.ContentTopic)))
|
2021-04-07 21:16:29 +00:00
|
|
|
i--
|
2021-04-08 22:07:31 +00:00
|
|
|
dAtA[i] = 0x12
|
2021-04-07 21:16:29 +00:00
|
|
|
}
|
|
|
|
if len(m.Payload) > 0 {
|
|
|
|
i -= len(m.Payload)
|
|
|
|
copy(dAtA[i:], m.Payload)
|
|
|
|
i = encodeVarintWakuMessage(dAtA, i, uint64(len(m.Payload)))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
}
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func encodeVarintWakuMessage(dAtA []byte, offset int, v uint64) int {
|
|
|
|
offset -= sovWakuMessage(v)
|
|
|
|
base := offset
|
|
|
|
for v >= 1<<7 {
|
|
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
|
|
v >>= 7
|
|
|
|
offset++
|
|
|
|
}
|
|
|
|
dAtA[offset] = uint8(v)
|
|
|
|
return base
|
|
|
|
}
|
|
|
|
func (m *WakuMessage) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Payload)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovWakuMessage(uint64(l))
|
|
|
|
}
|
2021-04-08 22:07:31 +00:00
|
|
|
l = len(m.ContentTopic)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovWakuMessage(uint64(l))
|
2021-04-07 21:16:29 +00:00
|
|
|
}
|
|
|
|
if m.Version != 0 {
|
|
|
|
n += 1 + sovWakuMessage(uint64(m.Version))
|
|
|
|
}
|
|
|
|
if m.Timestamp != 0 {
|
|
|
|
n += 9
|
|
|
|
}
|
2021-04-08 18:49:03 +00:00
|
|
|
l = len(m.Proof)
|
|
|
|
if l > 0 {
|
|
|
|
n += 2 + l + sovWakuMessage(uint64(l))
|
|
|
|
}
|
2021-04-07 21:16:29 +00:00
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
|
n += len(m.XXX_unrecognized)
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
2021-03-11 20:27:12 +00:00
|
|
|
|
2021-04-07 21:16:29 +00:00
|
|
|
func sovWakuMessage(x uint64) (n int) {
|
|
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
|
|
}
|
|
|
|
func sozWakuMessage(x uint64) (n int) {
|
|
|
|
return sovWakuMessage(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
|
|
}
|
|
|
|
func (m *WakuMessage) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowWakuMessage
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
|
|
|
}
|
2021-04-07 21:16:29 +00:00
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: WakuMessage: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: WakuMessage: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
|
|
|
|
}
|
|
|
|
var byteLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowWakuMessage
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
byteLen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthWakuMessage
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthWakuMessage
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
|
|
|
|
if m.Payload == nil {
|
|
|
|
m.Payload = []byte{}
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
2021-04-08 22:07:31 +00:00
|
|
|
if wireType != 2 {
|
2021-04-07 21:16:29 +00:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ContentTopic", wireType)
|
|
|
|
}
|
2021-04-08 22:07:31 +00:00
|
|
|
var stringLen uint64
|
2021-04-07 21:16:29 +00:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowWakuMessage
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2021-04-08 22:07:31 +00:00
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
2021-04-07 21:16:29 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2021-04-08 22:07:31 +00:00
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
|
|
|
return ErrInvalidLengthWakuMessage
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthWakuMessage
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.ContentTopic = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
2021-04-07 21:16:29 +00:00
|
|
|
case 3:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
|
|
|
|
}
|
|
|
|
m.Version = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowWakuMessage
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Version |= uint32(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 4:
|
2021-04-08 18:49:03 +00:00
|
|
|
if wireType != 1 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
|
|
|
|
}
|
|
|
|
var v uint64
|
|
|
|
if (iNdEx + 8) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
|
|
iNdEx += 8
|
|
|
|
m.Timestamp = float64(math.Float64frombits(v))
|
|
|
|
case 21:
|
2021-04-07 21:16:29 +00:00
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
|
|
|
|
}
|
|
|
|
var byteLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowWakuMessage
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
byteLen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthWakuMessage
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthWakuMessage
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...)
|
|
|
|
if m.Proof == nil {
|
|
|
|
m.Proof = []byte{}
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipWakuMessage(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
|
|
return ErrInvalidLengthWakuMessage
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
2021-04-07 21:16:29 +00:00
|
|
|
return nil
|
2021-03-11 20:27:12 +00:00
|
|
|
}
|
2021-04-07 21:16:29 +00:00
|
|
|
func skipWakuMessage(dAtA []byte) (n int, err error) {
|
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
depth := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowWakuMessage
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
switch wireType {
|
|
|
|
case 0:
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowWakuMessage
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx++
|
|
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 1:
|
|
|
|
iNdEx += 8
|
|
|
|
case 2:
|
|
|
|
var length int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowWakuMessage
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
length |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if length < 0 {
|
|
|
|
return 0, ErrInvalidLengthWakuMessage
|
|
|
|
}
|
|
|
|
iNdEx += length
|
|
|
|
case 3:
|
|
|
|
depth++
|
|
|
|
case 4:
|
|
|
|
if depth == 0 {
|
|
|
|
return 0, ErrUnexpectedEndOfGroupWakuMessage
|
|
|
|
}
|
|
|
|
depth--
|
|
|
|
case 5:
|
|
|
|
iNdEx += 4
|
|
|
|
default:
|
|
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
|
|
}
|
|
|
|
if iNdEx < 0 {
|
|
|
|
return 0, ErrInvalidLengthWakuMessage
|
|
|
|
}
|
|
|
|
if depth == 0 {
|
|
|
|
return iNdEx, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
|
|
|
|
var (
|
|
|
|
ErrInvalidLengthWakuMessage = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
|
|
ErrIntOverflowWakuMessage = fmt.Errorf("proto: integer overflow")
|
|
|
|
ErrUnexpectedEndOfGroupWakuMessage = fmt.Errorf("proto: unexpected end of group")
|
|
|
|
)
|