mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-17 07:18:46 +00:00
49a529388b
* resolve * resolve * return * remove deprecated protos * rem deprecated pbs * resolve cache * resolve md TODO * node server * resolve config todo * resolve even more * broken build
1388 lines
34 KiB
Go
Executable File
Generated
1388 lines
34 KiB
Go
Executable File
Generated
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: proto/beacon/p2p/v1/messages.proto
|
|
|
|
package ethereum_beacon_p2p_v1
|
|
|
|
import (
|
|
fmt "fmt"
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
io "io"
|
|
math "math"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type Goodbye_Reason int32
|
|
|
|
const (
|
|
Goodbye_UNKNOWN Goodbye_Reason = 0
|
|
Goodbye_CLIENT_SHUTDOWN Goodbye_Reason = 1
|
|
Goodbye_IRRELEVANT_NETWORK Goodbye_Reason = 2
|
|
Goodbye_GENERIC_ERROR Goodbye_Reason = 3
|
|
)
|
|
|
|
var Goodbye_Reason_name = map[int32]string{
|
|
0: "UNKNOWN",
|
|
1: "CLIENT_SHUTDOWN",
|
|
2: "IRRELEVANT_NETWORK",
|
|
3: "GENERIC_ERROR",
|
|
}
|
|
|
|
var Goodbye_Reason_value = map[string]int32{
|
|
"UNKNOWN": 0,
|
|
"CLIENT_SHUTDOWN": 1,
|
|
"IRRELEVANT_NETWORK": 2,
|
|
"GENERIC_ERROR": 3,
|
|
}
|
|
|
|
func (x Goodbye_Reason) String() string {
|
|
return proto.EnumName(Goodbye_Reason_name, int32(x))
|
|
}
|
|
|
|
func (Goodbye_Reason) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_a1d590cda035b632, []int{1, 0}
|
|
}
|
|
|
|
type Hello struct {
|
|
ForkVersion []byte `protobuf:"bytes,1,opt,name=fork_version,json=forkVersion,proto3" json:"fork_version,omitempty" ssz-size:"4"`
|
|
FinalizedRoot []byte `protobuf:"bytes,2,opt,name=finalized_root,json=finalizedRoot,proto3" json:"finalized_root,omitempty" ssz-size:"32"`
|
|
FinalizedEpoch uint64 `protobuf:"varint,3,opt,name=finalized_epoch,json=finalizedEpoch,proto3" json:"finalized_epoch,omitempty"`
|
|
HeadRoot []byte `protobuf:"bytes,4,opt,name=head_root,json=headRoot,proto3" json:"head_root,omitempty" ssz-size:"32"`
|
|
HeadSlot uint64 `protobuf:"varint,5,opt,name=head_slot,json=headSlot,proto3" json:"head_slot,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Hello) Reset() { *m = Hello{} }
|
|
func (m *Hello) String() string { return proto.CompactTextString(m) }
|
|
func (*Hello) ProtoMessage() {}
|
|
func (*Hello) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a1d590cda035b632, []int{0}
|
|
}
|
|
func (m *Hello) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Hello) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Hello.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Hello) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Hello.Merge(m, src)
|
|
}
|
|
func (m *Hello) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Hello) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Hello.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Hello proto.InternalMessageInfo
|
|
|
|
func (m *Hello) GetForkVersion() []byte {
|
|
if m != nil {
|
|
return m.ForkVersion
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Hello) GetFinalizedRoot() []byte {
|
|
if m != nil {
|
|
return m.FinalizedRoot
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Hello) GetFinalizedEpoch() uint64 {
|
|
if m != nil {
|
|
return m.FinalizedEpoch
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Hello) GetHeadRoot() []byte {
|
|
if m != nil {
|
|
return m.HeadRoot
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Hello) GetHeadSlot() uint64 {
|
|
if m != nil {
|
|
return m.HeadSlot
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Goodbye struct {
|
|
Reason Goodbye_Reason `protobuf:"varint,1,opt,name=reason,proto3,enum=ethereum.beacon.p2p.v1.Goodbye_Reason" json:"reason,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Goodbye) Reset() { *m = Goodbye{} }
|
|
func (m *Goodbye) String() string { return proto.CompactTextString(m) }
|
|
func (*Goodbye) ProtoMessage() {}
|
|
func (*Goodbye) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a1d590cda035b632, []int{1}
|
|
}
|
|
func (m *Goodbye) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Goodbye) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Goodbye.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Goodbye) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Goodbye.Merge(m, src)
|
|
}
|
|
func (m *Goodbye) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Goodbye) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Goodbye.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Goodbye proto.InternalMessageInfo
|
|
|
|
func (m *Goodbye) GetReason() Goodbye_Reason {
|
|
if m != nil {
|
|
return m.Reason
|
|
}
|
|
return Goodbye_UNKNOWN
|
|
}
|
|
|
|
type BeaconBlocksRequest struct {
|
|
HeadBlockRoot []byte `protobuf:"bytes,1,opt,name=head_block_root,json=headBlockRoot,proto3" json:"head_block_root,omitempty" ssz-size:"32"`
|
|
HeadSlot uint64 `protobuf:"varint,2,opt,name=head_slot,json=headSlot,proto3" json:"head_slot,omitempty"`
|
|
Count uint64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
|
|
Step uint64 `protobuf:"varint,4,opt,name=step,proto3" json:"step,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *BeaconBlocksRequest) Reset() { *m = BeaconBlocksRequest{} }
|
|
func (m *BeaconBlocksRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*BeaconBlocksRequest) ProtoMessage() {}
|
|
func (*BeaconBlocksRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a1d590cda035b632, []int{2}
|
|
}
|
|
func (m *BeaconBlocksRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *BeaconBlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_BeaconBlocksRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *BeaconBlocksRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_BeaconBlocksRequest.Merge(m, src)
|
|
}
|
|
func (m *BeaconBlocksRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *BeaconBlocksRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_BeaconBlocksRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_BeaconBlocksRequest proto.InternalMessageInfo
|
|
|
|
func (m *BeaconBlocksRequest) GetHeadBlockRoot() []byte {
|
|
if m != nil {
|
|
return m.HeadBlockRoot
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *BeaconBlocksRequest) GetHeadSlot() uint64 {
|
|
if m != nil {
|
|
return m.HeadSlot
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *BeaconBlocksRequest) GetCount() uint64 {
|
|
if m != nil {
|
|
return m.Count
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *BeaconBlocksRequest) GetStep() uint64 {
|
|
if m != nil {
|
|
return m.Step
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type RecentBeaconBlocksRequest struct {
|
|
BlockRoots [][]byte `protobuf:"bytes,1,rep,name=block_roots,json=blockRoots,proto3" json:"block_roots,omitempty" ssz-size:"?,32"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *RecentBeaconBlocksRequest) Reset() { *m = RecentBeaconBlocksRequest{} }
|
|
func (m *RecentBeaconBlocksRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*RecentBeaconBlocksRequest) ProtoMessage() {}
|
|
func (*RecentBeaconBlocksRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a1d590cda035b632, []int{3}
|
|
}
|
|
func (m *RecentBeaconBlocksRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *RecentBeaconBlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_RecentBeaconBlocksRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *RecentBeaconBlocksRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RecentBeaconBlocksRequest.Merge(m, src)
|
|
}
|
|
func (m *RecentBeaconBlocksRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *RecentBeaconBlocksRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RecentBeaconBlocksRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RecentBeaconBlocksRequest proto.InternalMessageInfo
|
|
|
|
func (m *RecentBeaconBlocksRequest) GetBlockRoots() [][]byte {
|
|
if m != nil {
|
|
return m.BlockRoots
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ErrorMessage struct {
|
|
ErrorMessage string `protobuf:"bytes,1,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ErrorMessage) Reset() { *m = ErrorMessage{} }
|
|
func (m *ErrorMessage) String() string { return proto.CompactTextString(m) }
|
|
func (*ErrorMessage) ProtoMessage() {}
|
|
func (*ErrorMessage) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a1d590cda035b632, []int{4}
|
|
}
|
|
func (m *ErrorMessage) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ErrorMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ErrorMessage.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ErrorMessage) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ErrorMessage.Merge(m, src)
|
|
}
|
|
func (m *ErrorMessage) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ErrorMessage) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ErrorMessage.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ErrorMessage proto.InternalMessageInfo
|
|
|
|
func (m *ErrorMessage) GetErrorMessage() string {
|
|
if m != nil {
|
|
return m.ErrorMessage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterEnum("ethereum.beacon.p2p.v1.Goodbye_Reason", Goodbye_Reason_name, Goodbye_Reason_value)
|
|
proto.RegisterType((*Hello)(nil), "ethereum.beacon.p2p.v1.Hello")
|
|
proto.RegisterType((*Goodbye)(nil), "ethereum.beacon.p2p.v1.Goodbye")
|
|
proto.RegisterType((*BeaconBlocksRequest)(nil), "ethereum.beacon.p2p.v1.BeaconBlocksRequest")
|
|
proto.RegisterType((*RecentBeaconBlocksRequest)(nil), "ethereum.beacon.p2p.v1.RecentBeaconBlocksRequest")
|
|
proto.RegisterType((*ErrorMessage)(nil), "ethereum.beacon.p2p.v1.ErrorMessage")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("proto/beacon/p2p/v1/messages.proto", fileDescriptor_a1d590cda035b632) }
|
|
|
|
var fileDescriptor_a1d590cda035b632 = []byte{
|
|
// 528 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8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marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Hello) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.ForkVersion) > 0 {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintMessages(dAtA, i, uint64(len(m.ForkVersion)))
|
|
i += copy(dAtA[i:], m.ForkVersion)
|
|
}
|
|
if len(m.FinalizedRoot) > 0 {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintMessages(dAtA, i, uint64(len(m.FinalizedRoot)))
|
|
i += copy(dAtA[i:], m.FinalizedRoot)
|
|
}
|
|
if m.FinalizedEpoch != 0 {
|
|
dAtA[i] = 0x18
|
|
i++
|
|
i = encodeVarintMessages(dAtA, i, uint64(m.FinalizedEpoch))
|
|
}
|
|
if len(m.HeadRoot) > 0 {
|
|
dAtA[i] = 0x22
|
|
i++
|
|
i = encodeVarintMessages(dAtA, i, uint64(len(m.HeadRoot)))
|
|
i += copy(dAtA[i:], m.HeadRoot)
|
|
}
|
|
if m.HeadSlot != 0 {
|
|
dAtA[i] = 0x28
|
|
i++
|
|
i = encodeVarintMessages(dAtA, i, uint64(m.HeadSlot))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *Goodbye) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Goodbye) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Reason != 0 {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintMessages(dAtA, i, uint64(m.Reason))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *BeaconBlocksRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *BeaconBlocksRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.HeadBlockRoot) > 0 {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintMessages(dAtA, i, uint64(len(m.HeadBlockRoot)))
|
|
i += copy(dAtA[i:], m.HeadBlockRoot)
|
|
}
|
|
if m.HeadSlot != 0 {
|
|
dAtA[i] = 0x10
|
|
i++
|
|
i = encodeVarintMessages(dAtA, i, uint64(m.HeadSlot))
|
|
}
|
|
if m.Count != 0 {
|
|
dAtA[i] = 0x18
|
|
i++
|
|
i = encodeVarintMessages(dAtA, i, uint64(m.Count))
|
|
}
|
|
if m.Step != 0 {
|
|
dAtA[i] = 0x20
|
|
i++
|
|
i = encodeVarintMessages(dAtA, i, uint64(m.Step))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *RecentBeaconBlocksRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *RecentBeaconBlocksRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.BlockRoots) > 0 {
|
|
for _, b := range m.BlockRoots {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintMessages(dAtA, i, uint64(len(b)))
|
|
i += copy(dAtA[i:], b)
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ErrorMessage) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ErrorMessage) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.ErrorMessage) > 0 {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintMessages(dAtA, i, uint64(len(m.ErrorMessage)))
|
|
i += copy(dAtA[i:], m.ErrorMessage)
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func encodeVarintMessages(dAtA []byte, offset int, v uint64) int {
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return offset + 1
|
|
}
|
|
func (m *Hello) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.ForkVersion)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessages(uint64(l))
|
|
}
|
|
l = len(m.FinalizedRoot)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessages(uint64(l))
|
|
}
|
|
if m.FinalizedEpoch != 0 {
|
|
n += 1 + sovMessages(uint64(m.FinalizedEpoch))
|
|
}
|
|
l = len(m.HeadRoot)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessages(uint64(l))
|
|
}
|
|
if m.HeadSlot != 0 {
|
|
n += 1 + sovMessages(uint64(m.HeadSlot))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Goodbye) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Reason != 0 {
|
|
n += 1 + sovMessages(uint64(m.Reason))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *BeaconBlocksRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.HeadBlockRoot)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessages(uint64(l))
|
|
}
|
|
if m.HeadSlot != 0 {
|
|
n += 1 + sovMessages(uint64(m.HeadSlot))
|
|
}
|
|
if m.Count != 0 {
|
|
n += 1 + sovMessages(uint64(m.Count))
|
|
}
|
|
if m.Step != 0 {
|
|
n += 1 + sovMessages(uint64(m.Step))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RecentBeaconBlocksRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.BlockRoots) > 0 {
|
|
for _, b := range m.BlockRoots {
|
|
l = len(b)
|
|
n += 1 + l + sovMessages(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ErrorMessage) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.ErrorMessage)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessages(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovMessages(x uint64) (n int) {
|
|
for {
|
|
n++
|
|
x >>= 7
|
|
if x == 0 {
|
|
break
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
func sozMessages(x uint64) (n int) {
|
|
return sovMessages(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *Hello) 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 ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Hello: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Hello: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ForkVersion", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ForkVersion = append(m.ForkVersion[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.ForkVersion == nil {
|
|
m.ForkVersion = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field FinalizedRoot", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.FinalizedRoot = append(m.FinalizedRoot[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.FinalizedRoot == nil {
|
|
m.FinalizedRoot = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field FinalizedEpoch", wireType)
|
|
}
|
|
m.FinalizedEpoch = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.FinalizedEpoch |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field HeadRoot", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.HeadRoot = append(m.HeadRoot[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.HeadRoot == nil {
|
|
m.HeadRoot = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field HeadSlot", wireType)
|
|
}
|
|
m.HeadSlot = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.HeadSlot |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMessages(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
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
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Goodbye) 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 ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Goodbye: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Goodbye: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
|
|
}
|
|
m.Reason = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Reason |= Goodbye_Reason(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMessages(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
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
|
|
}
|
|
return nil
|
|
}
|
|
func (m *BeaconBlocksRequest) 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 ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: BeaconBlocksRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: BeaconBlocksRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field HeadBlockRoot", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.HeadBlockRoot = append(m.HeadBlockRoot[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.HeadBlockRoot == nil {
|
|
m.HeadBlockRoot = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field HeadSlot", wireType)
|
|
}
|
|
m.HeadSlot = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.HeadSlot |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
|
|
}
|
|
m.Count = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Count |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType)
|
|
}
|
|
m.Step = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Step |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMessages(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
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
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RecentBeaconBlocksRequest) 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 ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: RecentBeaconBlocksRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RecentBeaconBlocksRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field BlockRoots", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.BlockRoots = append(m.BlockRoots, make([]byte, postIndex-iNdEx))
|
|
copy(m.BlockRoots[len(m.BlockRoots)-1], dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMessages(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
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
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ErrorMessage) 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 ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ErrorMessage: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ErrorMessage: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ErrorMessage = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMessages(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthMessages
|
|
}
|
|
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
|
|
}
|
|
return nil
|
|
}
|
|
func skipMessages(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMessages
|
|
}
|
|
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, ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 1:
|
|
iNdEx += 8
|
|
return iNdEx, nil
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMessages
|
|
}
|
|
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, ErrInvalidLengthMessages
|
|
}
|
|
iNdEx += length
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthMessages
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMessages
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
innerWire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
innerWireType := int(innerWire & 0x7)
|
|
if innerWireType == 4 {
|
|
break
|
|
}
|
|
next, err := skipMessages(dAtA[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthMessages
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 4:
|
|
return iNdEx, nil
|
|
case 5:
|
|
iNdEx += 4
|
|
return iNdEx, nil
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow")
|
|
)
|