prysm-pulse/proto/beacon/p2p/v1/messages.pb.go
2020-06-09 15:40:48 -07:00

1644 lines
41 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"
github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield"
io "io"
math "math"
math_bits "math/bits"
)
// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Status struct {
ForkDigest []byte `protobuf:"bytes,1,opt,name=fork_digest,json=forkDigest,proto3" json:"fork_digest,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 *Status) Reset() { *m = Status{} }
func (m *Status) String() string { return proto.CompactTextString(m) }
func (*Status) ProtoMessage() {}
func (*Status) Descriptor() ([]byte, []int) {
return fileDescriptor_a1d590cda035b632, []int{0}
}
func (m *Status) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Status.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Status) XXX_Merge(src proto.Message) {
xxx_messageInfo_Status.Merge(m, src)
}
func (m *Status) XXX_Size() int {
return m.Size()
}
func (m *Status) XXX_DiscardUnknown() {
xxx_messageInfo_Status.DiscardUnknown(m)
}
var xxx_messageInfo_Status proto.InternalMessageInfo
func (m *Status) GetForkDigest() []byte {
if m != nil {
return m.ForkDigest
}
return nil
}
func (m *Status) GetFinalizedRoot() []byte {
if m != nil {
return m.FinalizedRoot
}
return nil
}
func (m *Status) GetFinalizedEpoch() uint64 {
if m != nil {
return m.FinalizedEpoch
}
return 0
}
func (m *Status) GetHeadRoot() []byte {
if m != nil {
return m.HeadRoot
}
return nil
}
func (m *Status) GetHeadSlot() uint64 {
if m != nil {
return m.HeadSlot
}
return 0
}
type BeaconBlocksByRangeRequest struct {
StartSlot uint64 `protobuf:"varint,1,opt,name=start_slot,json=startSlot,proto3" json:"start_slot,omitempty"`
Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
Step uint64 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BeaconBlocksByRangeRequest) Reset() { *m = BeaconBlocksByRangeRequest{} }
func (m *BeaconBlocksByRangeRequest) String() string { return proto.CompactTextString(m) }
func (*BeaconBlocksByRangeRequest) ProtoMessage() {}
func (*BeaconBlocksByRangeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_a1d590cda035b632, []int{1}
}
func (m *BeaconBlocksByRangeRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BeaconBlocksByRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BeaconBlocksByRangeRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *BeaconBlocksByRangeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_BeaconBlocksByRangeRequest.Merge(m, src)
}
func (m *BeaconBlocksByRangeRequest) XXX_Size() int {
return m.Size()
}
func (m *BeaconBlocksByRangeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_BeaconBlocksByRangeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_BeaconBlocksByRangeRequest proto.InternalMessageInfo
func (m *BeaconBlocksByRangeRequest) GetStartSlot() uint64 {
if m != nil {
return m.StartSlot
}
return 0
}
func (m *BeaconBlocksByRangeRequest) GetCount() uint64 {
if m != nil {
return m.Count
}
return 0
}
func (m *BeaconBlocksByRangeRequest) GetStep() uint64 {
if m != nil {
return m.Step
}
return 0
}
type BeaconBlocksByRootRequest struct {
BlockRoots [][]byte `protobuf:"bytes,1,rep,name=block_roots,json=blockRoots,proto3" json:"block_roots,omitempty" ssz-size:"?,32" ssz-max:"1024"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BeaconBlocksByRootRequest) Reset() { *m = BeaconBlocksByRootRequest{} }
func (m *BeaconBlocksByRootRequest) String() string { return proto.CompactTextString(m) }
func (*BeaconBlocksByRootRequest) ProtoMessage() {}
func (*BeaconBlocksByRootRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_a1d590cda035b632, []int{2}
}
func (m *BeaconBlocksByRootRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BeaconBlocksByRootRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BeaconBlocksByRootRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *BeaconBlocksByRootRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_BeaconBlocksByRootRequest.Merge(m, src)
}
func (m *BeaconBlocksByRootRequest) XXX_Size() int {
return m.Size()
}
func (m *BeaconBlocksByRootRequest) XXX_DiscardUnknown() {
xxx_messageInfo_BeaconBlocksByRootRequest.DiscardUnknown(m)
}
var xxx_messageInfo_BeaconBlocksByRootRequest proto.InternalMessageInfo
func (m *BeaconBlocksByRootRequest) GetBlockRoots() [][]byte {
if m != nil {
return m.BlockRoots
}
return nil
}
type ErrorResponse struct {
Message []byte `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty" ssz-max:"256"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ErrorResponse) Reset() { *m = ErrorResponse{} }
func (m *ErrorResponse) String() string { return proto.CompactTextString(m) }
func (*ErrorResponse) ProtoMessage() {}
func (*ErrorResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_a1d590cda035b632, []int{3}
}
func (m *ErrorResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ErrorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ErrorResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ErrorResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ErrorResponse.Merge(m, src)
}
func (m *ErrorResponse) XXX_Size() int {
return m.Size()
}
func (m *ErrorResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ErrorResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ErrorResponse proto.InternalMessageInfo
func (m *ErrorResponse) GetMessage() []byte {
if m != nil {
return m.Message
}
return nil
}
type ENRForkID struct {
CurrentForkDigest []byte `protobuf:"bytes,1,opt,name=current_fork_digest,json=currentForkDigest,proto3" json:"current_fork_digest,omitempty" ssz-size:"4"`
NextForkVersion []byte `protobuf:"bytes,2,opt,name=next_fork_version,json=nextForkVersion,proto3" json:"next_fork_version,omitempty" ssz-size:"4"`
NextForkEpoch uint64 `protobuf:"varint,3,opt,name=next_fork_epoch,json=nextForkEpoch,proto3" json:"next_fork_epoch,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ENRForkID) Reset() { *m = ENRForkID{} }
func (m *ENRForkID) String() string { return proto.CompactTextString(m) }
func (*ENRForkID) ProtoMessage() {}
func (*ENRForkID) Descriptor() ([]byte, []int) {
return fileDescriptor_a1d590cda035b632, []int{4}
}
func (m *ENRForkID) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ENRForkID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ENRForkID.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ENRForkID) XXX_Merge(src proto.Message) {
xxx_messageInfo_ENRForkID.Merge(m, src)
}
func (m *ENRForkID) XXX_Size() int {
return m.Size()
}
func (m *ENRForkID) XXX_DiscardUnknown() {
xxx_messageInfo_ENRForkID.DiscardUnknown(m)
}
var xxx_messageInfo_ENRForkID proto.InternalMessageInfo
func (m *ENRForkID) GetCurrentForkDigest() []byte {
if m != nil {
return m.CurrentForkDigest
}
return nil
}
func (m *ENRForkID) GetNextForkVersion() []byte {
if m != nil {
return m.NextForkVersion
}
return nil
}
func (m *ENRForkID) GetNextForkEpoch() uint64 {
if m != nil {
return m.NextForkEpoch
}
return 0
}
type MetaData struct {
SeqNumber uint64 `protobuf:"varint,1,opt,name=seq_number,json=seqNumber,proto3" json:"seq_number,omitempty"`
Attnets github_com_prysmaticlabs_go_bitfield.Bitvector64 `protobuf:"bytes,2,opt,name=attnets,proto3,casttype=github.com/prysmaticlabs/go-bitfield.Bitvector64" json:"attnets,omitempty" ssz-size:"8"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MetaData) Reset() { *m = MetaData{} }
func (m *MetaData) String() string { return proto.CompactTextString(m) }
func (*MetaData) ProtoMessage() {}
func (*MetaData) Descriptor() ([]byte, []int) {
return fileDescriptor_a1d590cda035b632, []int{5}
}
func (m *MetaData) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MetaData.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *MetaData) XXX_Merge(src proto.Message) {
xxx_messageInfo_MetaData.Merge(m, src)
}
func (m *MetaData) XXX_Size() int {
return m.Size()
}
func (m *MetaData) XXX_DiscardUnknown() {
xxx_messageInfo_MetaData.DiscardUnknown(m)
}
var xxx_messageInfo_MetaData proto.InternalMessageInfo
func (m *MetaData) GetSeqNumber() uint64 {
if m != nil {
return m.SeqNumber
}
return 0
}
func (m *MetaData) GetAttnets() github_com_prysmaticlabs_go_bitfield.Bitvector64 {
if m != nil {
return m.Attnets
}
return nil
}
func init() {
proto.RegisterType((*Status)(nil), "ethereum.beacon.p2p.v1.Status")
proto.RegisterType((*BeaconBlocksByRangeRequest)(nil), "ethereum.beacon.p2p.v1.BeaconBlocksByRangeRequest")
proto.RegisterType((*BeaconBlocksByRootRequest)(nil), "ethereum.beacon.p2p.v1.BeaconBlocksByRootRequest")
proto.RegisterType((*ErrorResponse)(nil), "ethereum.beacon.p2p.v1.ErrorResponse")
proto.RegisterType((*ENRForkID)(nil), "ethereum.beacon.p2p.v1.ENRForkID")
proto.RegisterType((*MetaData)(nil), "ethereum.beacon.p2p.v1.MetaData")
}
func init() {
proto.RegisterFile("proto/beacon/p2p/v1/messages.proto", fileDescriptor_a1d590cda035b632)
}
var fileDescriptor_a1d590cda035b632 = []byte{
// 576 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcd, 0x6e, 0xd3, 0x4c,
0x14, 0x86, 0xe5, 0xaf, 0xe9, 0xdf, 0x34, 0xf9, 0x4a, 0x07, 0x84, 0x42, 0x11, 0x49, 0x34, 0x0b,
0xa8, 0x04, 0xb5, 0x9b, 0xb4, 0x54, 0x55, 0x55, 0x09, 0x64, 0xd2, 0x4a, 0x2c, 0xe8, 0xc2, 0x95,
0x58, 0x12, 0xc6, 0xee, 0x89, 0x63, 0x35, 0xf1, 0x71, 0x67, 0x8e, 0xa3, 0xb6, 0x77, 0xc0, 0xf5,
0x70, 0x13, 0x2c, 0xb9, 0x82, 0x08, 0x75, 0xcb, 0xae, 0x4b, 0x56, 0x68, 0xc6, 0x4e, 0x53, 0x40,
0x48, 0xec, 0x66, 0xce, 0x3c, 0xef, 0x3b, 0x73, 0x7e, 0x86, 0x89, 0x4c, 0x21, 0xa1, 0x17, 0x82,
0x8c, 0x30, 0xf5, 0xb2, 0x4e, 0xe6, 0x8d, 0xdb, 0xde, 0x08, 0xb4, 0x96, 0x31, 0x68, 0xd7, 0x1e,
0xf2, 0x87, 0x40, 0x03, 0x50, 0x90, 0x8f, 0xdc, 0x02, 0x73, 0xb3, 0x4e, 0xe6, 0x8e, 0xdb, 0xeb,
0x9b, 0x71, 0x42, 0x83, 0x3c, 0x74, 0x23, 0x1c, 0x79, 0x31, 0xc6, 0xe8, 0x59, 0x3c, 0xcc, 0xfb,
0x76, 0x57, 0x18, 0x9b, 0x55, 0x61, 0x23, 0xbe, 0x3b, 0x6c, 0xe1, 0x84, 0x24, 0xe5, 0x9a, 0xb7,
0xd9, 0x4a, 0x1f, 0xd5, 0x59, 0xef, 0x34, 0x89, 0x41, 0x53, 0xdd, 0x69, 0x39, 0x1b, 0x55, 0xff,
0xde, 0xcd, 0xa4, 0x59, 0xd5, 0xfa, 0x6a, 0x53, 0x27, 0x57, 0xb0, 0x2f, 0x76, 0x44, 0xc0, 0x0c,
0xd4, 0xb5, 0x0c, 0xdf, 0x63, 0xff, 0xf7, 0x93, 0x54, 0x0e, 0x93, 0x2b, 0x38, 0xed, 0x29, 0x44,
0xaa, 0xff, 0x67, 0x55, 0x6b, 0x37, 0x93, 0x66, 0x6d, 0xa6, 0xda, 0xee, 0x88, 0xa0, 0x76, 0x0b,
0x06, 0x88, 0xc4, 0x9f, 0xb1, 0xd5, 0x99, 0x12, 0x32, 0x8c, 0x06, 0xf5, 0xb9, 0x96, 0xb3, 0x51,
0x09, 0x66, 0x86, 0x87, 0x26, 0xca, 0x5d, 0xb6, 0x3c, 0x00, 0x59, 0xba, 0x57, 0xfe, 0xe6, 0xbe,
0x64, 0x18, 0x6b, 0xfc, 0xb8, 0xe4, 0xf5, 0x10, 0xa9, 0x3e, 0x6f, 0x2d, 0xed, 0xe1, 0xc9, 0x10,
0x49, 0x00, 0x5b, 0xf7, 0x6d, 0xb5, 0xfc, 0x21, 0x46, 0x67, 0xda, 0xbf, 0x0c, 0x64, 0x1a, 0x43,
0x00, 0xe7, 0xb9, 0xc9, 0xe6, 0x09, 0x63, 0x9a, 0xa4, 0xa2, 0x42, 0xeb, 0x58, 0xed, 0xb2, 0x8d,
0x18, 0x31, 0x7f, 0xc0, 0xe6, 0x23, 0xcc, 0xd3, 0x22, 0xc7, 0x4a, 0x50, 0x6c, 0x38, 0x67, 0x15,
0x4d, 0x90, 0x95, 0xaf, 0xb7, 0x6b, 0xf1, 0x91, 0x3d, 0xfa, 0xed, 0x1a, 0x44, 0x9a, 0xde, 0xf2,
0x86, 0xad, 0x84, 0x26, 0x6c, 0x33, 0xd2, 0x75, 0xa7, 0x35, 0xb7, 0x51, 0xf5, 0xc5, 0xcd, 0xa4,
0xd9, 0x98, 0xa5, 0xf4, 0xea, 0xc5, 0x76, 0x47, 0xb4, 0xcc, 0x7e, 0x24, 0x2f, 0xf6, 0x45, 0x7b,
0xab, 0x63, 0x0a, 0x6f, 0x65, 0xc6, 0x4a, 0x8b, 0x03, 0x56, 0x3b, 0x54, 0x0a, 0x55, 0x00, 0x3a,
0xc3, 0x54, 0x03, 0x7f, 0xce, 0x16, 0xcb, 0x01, 0x29, 0x1b, 0x77, 0x5b, 0x24, 0xeb, 0xd0, 0x79,
0xb9, 0x2b, 0x82, 0x29, 0x21, 0x3e, 0x3b, 0x6c, 0xf9, 0xf0, 0x38, 0x38, 0x42, 0x75, 0xf6, 0xb6,
0xcb, 0x5f, 0xb3, 0xfb, 0x51, 0xae, 0x14, 0xa4, 0xd4, 0xfb, 0x97, 0xfe, 0xaf, 0x95, 0xf0, 0xd1,
0x6c, 0x0c, 0x0e, 0xd8, 0x5a, 0x0a, 0x17, 0xa5, 0x7c, 0x0c, 0x4a, 0x27, 0x98, 0x96, 0x93, 0xf0,
0xa7, 0x7e, 0xd5, 0xa0, 0x46, 0xfc, 0xbe, 0x00, 0xf9, 0x53, 0xb6, 0x3a, 0x53, 0xdf, 0x1d, 0x85,
0xda, 0x94, 0xb4, 0x93, 0x20, 0x3e, 0x39, 0x6c, 0xe9, 0x1d, 0x90, 0xec, 0x4a, 0x92, 0xb6, 0x57,
0x70, 0xde, 0x4b, 0xf3, 0x51, 0x08, 0xea, 0xb6, 0x57, 0x70, 0x7e, 0x6c, 0x03, 0xfc, 0x03, 0x5b,
0x94, 0x44, 0x29, 0x90, 0x2e, 0xdf, 0xd1, 0xfd, 0xf5, 0x1d, 0x7b, 0xe2, 0xc7, 0xa4, 0xb9, 0x75,
0xe7, 0xab, 0x64, 0xea, 0x52, 0x8f, 0x24, 0x25, 0xd1, 0x50, 0x86, 0xda, 0x8b, 0x71, 0x33, 0x4c,
0xa8, 0x9f, 0xc0, 0xf0, 0xd4, 0xf5, 0x13, 0x1a, 0x43, 0x44, 0xa8, 0x76, 0x77, 0x82, 0xa9, 0xa9,
0x5f, 0xfd, 0x72, 0xdd, 0x70, 0xbe, 0x5e, 0x37, 0x9c, 0x6f, 0xd7, 0x0d, 0x27, 0x5c, 0xb0, 0x7f,
0x69, 0xfb, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xa6, 0x5c, 0x42, 0xb8, 0x03, 0x00, 0x00,
}
func (m *Status) 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 *Status) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Status) 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 m.HeadSlot != 0 {
i = encodeVarintMessages(dAtA, i, uint64(m.HeadSlot))
i--
dAtA[i] = 0x28
}
if len(m.HeadRoot) > 0 {
i -= len(m.HeadRoot)
copy(dAtA[i:], m.HeadRoot)
i = encodeVarintMessages(dAtA, i, uint64(len(m.HeadRoot)))
i--
dAtA[i] = 0x22
}
if m.FinalizedEpoch != 0 {
i = encodeVarintMessages(dAtA, i, uint64(m.FinalizedEpoch))
i--
dAtA[i] = 0x18
}
if len(m.FinalizedRoot) > 0 {
i -= len(m.FinalizedRoot)
copy(dAtA[i:], m.FinalizedRoot)
i = encodeVarintMessages(dAtA, i, uint64(len(m.FinalizedRoot)))
i--
dAtA[i] = 0x12
}
if len(m.ForkDigest) > 0 {
i -= len(m.ForkDigest)
copy(dAtA[i:], m.ForkDigest)
i = encodeVarintMessages(dAtA, i, uint64(len(m.ForkDigest)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *BeaconBlocksByRangeRequest) 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 *BeaconBlocksByRangeRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *BeaconBlocksByRangeRequest) 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 m.Step != 0 {
i = encodeVarintMessages(dAtA, i, uint64(m.Step))
i--
dAtA[i] = 0x18
}
if m.Count != 0 {
i = encodeVarintMessages(dAtA, i, uint64(m.Count))
i--
dAtA[i] = 0x10
}
if m.StartSlot != 0 {
i = encodeVarintMessages(dAtA, i, uint64(m.StartSlot))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *BeaconBlocksByRootRequest) 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 *BeaconBlocksByRootRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *BeaconBlocksByRootRequest) 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.BlockRoots) > 0 {
for iNdEx := len(m.BlockRoots) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.BlockRoots[iNdEx])
copy(dAtA[i:], m.BlockRoots[iNdEx])
i = encodeVarintMessages(dAtA, i, uint64(len(m.BlockRoots[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *ErrorResponse) 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 *ErrorResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ErrorResponse) 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.Message) > 0 {
i -= len(m.Message)
copy(dAtA[i:], m.Message)
i = encodeVarintMessages(dAtA, i, uint64(len(m.Message)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *ENRForkID) 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 *ENRForkID) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ENRForkID) 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 m.NextForkEpoch != 0 {
i = encodeVarintMessages(dAtA, i, uint64(m.NextForkEpoch))
i--
dAtA[i] = 0x18
}
if len(m.NextForkVersion) > 0 {
i -= len(m.NextForkVersion)
copy(dAtA[i:], m.NextForkVersion)
i = encodeVarintMessages(dAtA, i, uint64(len(m.NextForkVersion)))
i--
dAtA[i] = 0x12
}
if len(m.CurrentForkDigest) > 0 {
i -= len(m.CurrentForkDigest)
copy(dAtA[i:], m.CurrentForkDigest)
i = encodeVarintMessages(dAtA, i, uint64(len(m.CurrentForkDigest)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *MetaData) 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 *MetaData) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MetaData) 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.Attnets) > 0 {
i -= len(m.Attnets)
copy(dAtA[i:], m.Attnets)
i = encodeVarintMessages(dAtA, i, uint64(len(m.Attnets)))
i--
dAtA[i] = 0x12
}
if m.SeqNumber != 0 {
i = encodeVarintMessages(dAtA, i, uint64(m.SeqNumber))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintMessages(dAtA []byte, offset int, v uint64) int {
offset -= sovMessages(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Status) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.ForkDigest)
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 *BeaconBlocksByRangeRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.StartSlot != 0 {
n += 1 + sovMessages(uint64(m.StartSlot))
}
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 *BeaconBlocksByRootRequest) 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 *ErrorResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Message)
if l > 0 {
n += 1 + l + sovMessages(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ENRForkID) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.CurrentForkDigest)
if l > 0 {
n += 1 + l + sovMessages(uint64(l))
}
l = len(m.NextForkVersion)
if l > 0 {
n += 1 + l + sovMessages(uint64(l))
}
if m.NextForkEpoch != 0 {
n += 1 + sovMessages(uint64(m.NextForkEpoch))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *MetaData) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.SeqNumber != 0 {
n += 1 + sovMessages(uint64(m.SeqNumber))
}
l = len(m.Attnets)
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) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozMessages(x uint64) (n int) {
return sovMessages(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Status) 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: Status: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ForkDigest", 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.ForkDigest = append(m.ForkDigest[:0], dAtA[iNdEx:postIndex]...)
if m.ForkDigest == nil {
m.ForkDigest = []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 *BeaconBlocksByRangeRequest) 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: BeaconBlocksByRangeRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: BeaconBlocksByRangeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field StartSlot", wireType)
}
m.StartSlot = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessages
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.StartSlot |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
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 3:
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 *BeaconBlocksByRootRequest) 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: BeaconBlocksByRootRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: BeaconBlocksByRootRequest: 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 *ErrorResponse) 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: ErrorResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ErrorResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Message", 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.Message = append(m.Message[:0], dAtA[iNdEx:postIndex]...)
if m.Message == nil {
m.Message = []byte{}
}
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 *ENRForkID) 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: ENRForkID: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ENRForkID: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CurrentForkDigest", 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.CurrentForkDigest = append(m.CurrentForkDigest[:0], dAtA[iNdEx:postIndex]...)
if m.CurrentForkDigest == nil {
m.CurrentForkDigest = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NextForkVersion", 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.NextForkVersion = append(m.NextForkVersion[:0], dAtA[iNdEx:postIndex]...)
if m.NextForkVersion == nil {
m.NextForkVersion = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field NextForkEpoch", wireType)
}
m.NextForkEpoch = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessages
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.NextForkEpoch |= 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 *MetaData) 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: MetaData: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MetaData: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SeqNumber", wireType)
}
m.SeqNumber = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessages
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.SeqNumber |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Attnets", 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.Attnets = append(m.Attnets[:0], dAtA[iNdEx:postIndex]...)
if m.Attnets == nil {
m.Attnets = []byte{}
}
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
depth := 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
}
}
case 1:
iNdEx += 8
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
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupMessages
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthMessages
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupMessages = fmt.Errorf("proto: unexpected end of group")
)