Fix go pbs (#4626)

* fix issues

* fix go pbs

* added services

* added services

* remove unused files

* bring back used files

* bring back db proto files

* gaz

* gaz and bring back faucet

* gaz and bring back rpc

* gaz and bring back rpc

* gaz and bring back rpc

* go imports

* remove unused
This commit is contained in:
shayzluf
2020-01-23 16:03:11 +05:30
committed by GitHub
parent ed3ab828a1
commit 5df77848bb
11 changed files with 1852 additions and 1874 deletions

View File

@@ -6,10 +6,11 @@ package testing
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
metadata "google.golang.org/grpc/metadata"
reflect "reflect"
)
// MockBeaconChain_StreamChainHeadServer is a mock of BeaconChain_StreamChainHeadServer interface

View File

@@ -7,6 +7,7 @@ import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
@@ -23,7 +24,7 @@ var _ = math.Inf
// 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
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type AttestationContainer struct {
Data *v1alpha1.AttestationData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
@@ -47,7 +48,7 @@ func (m *AttestationContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte
return xxx_messageInfo_AttestationContainer.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -103,7 +104,7 @@ func (m *AttestationContainer_SignaturePair) XXX_Marshal(b []byte, deterministic
return xxx_messageInfo_AttestationContainer_SignaturePair.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -182,7 +183,7 @@ var fileDescriptor_29679516eb4218c9 = []byte{
func (m *AttestationContainer) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -190,42 +191,52 @@ func (m *AttestationContainer) Marshal() (dAtA []byte, err error) {
}
func (m *AttestationContainer) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AttestationContainer) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Data != nil {
dAtA[i] = 0xa
i++
i = encodeVarintAttestationContainer(dAtA, i, uint64(m.Data.Size()))
n1, err := m.Data.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n1
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.SignaturePairs) > 0 {
for _, msg := range m.SignaturePairs {
for iNdEx := len(m.SignaturePairs) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.SignaturePairs[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintAttestationContainer(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
i++
i = encodeVarintAttestationContainer(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
}
}
if m.Data != nil {
{
size, err := m.Data.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i += n
i -= size
i = encodeVarintAttestationContainer(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
return len(dAtA) - i, nil
}
func (m *AttestationContainer_SignaturePair) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -233,46 +244,56 @@ func (m *AttestationContainer_SignaturePair) Marshal() (dAtA []byte, err error)
}
func (m *AttestationContainer_SignaturePair) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AttestationContainer_SignaturePair) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.AggregationBits) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintAttestationContainer(dAtA, i, uint64(len(m.AggregationBits)))
i += copy(dAtA[i:], m.AggregationBits)
}
if len(m.Signature) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintAttestationContainer(dAtA, i, uint64(len(m.Signature)))
i += copy(dAtA[i:], m.Signature)
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.VoteCounted {
dAtA[i] = 0x18
i++
i--
if m.VoteCounted {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
i--
dAtA[i] = 0x18
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
if len(m.Signature) > 0 {
i -= len(m.Signature)
copy(dAtA[i:], m.Signature)
i = encodeVarintAttestationContainer(dAtA, i, uint64(len(m.Signature)))
i--
dAtA[i] = 0x12
}
return i, nil
if len(m.AggregationBits) > 0 {
i -= len(m.AggregationBits)
copy(dAtA[i:], m.AggregationBits)
i = encodeVarintAttestationContainer(dAtA, i, uint64(len(m.AggregationBits)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintAttestationContainer(dAtA []byte, offset int, v uint64) int {
offset -= sovAttestationContainer(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
return base
}
func (m *AttestationContainer) Size() (n int) {
if m == nil {
@@ -320,14 +341,7 @@ func (m *AttestationContainer_SignaturePair) Size() (n int) {
}
func sovAttestationContainer(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
return (math_bits.Len64(x|1) + 6) / 7
}
func sozAttestationContainer(x uint64) (n int) {
return sovAttestationContainer(uint64((x << 1) ^ uint64((int64(x) >> 63))))

View File

@@ -7,6 +7,7 @@ import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/gogo/protobuf/proto"
)
@@ -20,7 +21,7 @@ var _ = math.Inf
// 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
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type FinalizedBlockRootContainer struct {
ParentRoot []byte `protobuf:"bytes,1,opt,name=parent_root,json=parentRoot,proto3" json:"parent_root,omitempty"`
@@ -44,7 +45,7 @@ func (m *FinalizedBlockRootContainer) XXX_Marshal(b []byte, deterministic bool)
return xxx_messageInfo_FinalizedBlockRootContainer.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -105,7 +106,7 @@ var fileDescriptor_f952363f5bc83b7b = []byte{
func (m *FinalizedBlockRootContainer) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -113,36 +114,46 @@ func (m *FinalizedBlockRootContainer) Marshal() (dAtA []byte, err error) {
}
func (m *FinalizedBlockRootContainer) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *FinalizedBlockRootContainer) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.ParentRoot) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintFinalizedBlockRootContainer(dAtA, i, uint64(len(m.ParentRoot)))
i += copy(dAtA[i:], m.ParentRoot)
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.ChildRoot) > 0 {
dAtA[i] = 0x12
i++
i -= len(m.ChildRoot)
copy(dAtA[i:], m.ChildRoot)
i = encodeVarintFinalizedBlockRootContainer(dAtA, i, uint64(len(m.ChildRoot)))
i += copy(dAtA[i:], m.ChildRoot)
i--
dAtA[i] = 0x12
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
if len(m.ParentRoot) > 0 {
i -= len(m.ParentRoot)
copy(dAtA[i:], m.ParentRoot)
i = encodeVarintFinalizedBlockRootContainer(dAtA, i, uint64(len(m.ParentRoot)))
i--
dAtA[i] = 0xa
}
return i, nil
return len(dAtA) - i, nil
}
func encodeVarintFinalizedBlockRootContainer(dAtA []byte, offset int, v uint64) int {
offset -= sovFinalizedBlockRootContainer(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
return base
}
func (m *FinalizedBlockRootContainer) Size() (n int) {
if m == nil {
@@ -165,14 +176,7 @@ func (m *FinalizedBlockRootContainer) Size() (n int) {
}
func sovFinalizedBlockRootContainer(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
return (math_bits.Len64(x|1) + 6) / 7
}
func sozFinalizedBlockRootContainer(x uint64) (n int) {
return sovFinalizedBlockRootContainer(uint64((x << 1) ^ uint64((int64(x) >> 63))))

View File

@@ -7,6 +7,7 @@ import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
@@ -22,7 +23,7 @@ var _ = math.Inf
// 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
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type ArchivedActiveSetChanges struct {
Activated []uint64 `protobuf:"varint,1,rep,packed,name=activated,proto3" json:"activated,omitempty"`
@@ -50,7 +51,7 @@ func (m *ArchivedActiveSetChanges) XXX_Marshal(b []byte, deterministic bool) ([]
return xxx_messageInfo_ArchivedActiveSetChanges.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -133,7 +134,7 @@ func (m *ArchivedCommitteeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byt
return xxx_messageInfo_ArchivedCommitteeInfo.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -205,7 +206,7 @@ var fileDescriptor_289929478e9672a3 = []byte{
func (m *ArchivedActiveSetChanges) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -213,14 +214,65 @@ func (m *ArchivedActiveSetChanges) Marshal() (dAtA []byte, err error) {
}
func (m *ArchivedActiveSetChanges) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ArchivedActiveSetChanges) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Activated) > 0 {
dAtA2 := make([]byte, len(m.Activated)*10)
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.AttesterSlashings) > 0 {
for iNdEx := len(m.AttesterSlashings) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.AttesterSlashings[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintArchive(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x42
}
}
if len(m.ProposerSlashings) > 0 {
for iNdEx := len(m.ProposerSlashings) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.ProposerSlashings[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintArchive(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x3a
}
}
if len(m.VoluntaryExits) > 0 {
for iNdEx := len(m.VoluntaryExits) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.VoluntaryExits[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintArchive(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x32
}
}
if len(m.Slashed) > 0 {
dAtA2 := make([]byte, len(m.Slashed)*10)
var j1 int
for _, num := range m.Activated {
for _, num := range m.Slashed {
for num >= 1<<7 {
dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
@@ -229,10 +281,11 @@ func (m *ArchivedActiveSetChanges) MarshalTo(dAtA []byte) (int, error) {
dAtA2[j1] = uint8(num)
j1++
}
dAtA[i] = 0xa
i++
i -= j1
copy(dAtA[i:], dAtA2[:j1])
i = encodeVarintArchive(dAtA, i, uint64(j1))
i += copy(dAtA[i:], dAtA2[:j1])
i--
dAtA[i] = 0x22
}
if len(m.Exited) > 0 {
dAtA4 := make([]byte, len(m.Exited)*10)
@@ -246,15 +299,16 @@ func (m *ArchivedActiveSetChanges) MarshalTo(dAtA []byte) (int, error) {
dAtA4[j3] = uint8(num)
j3++
}
dAtA[i] = 0x12
i++
i -= j3
copy(dAtA[i:], dAtA4[:j3])
i = encodeVarintArchive(dAtA, i, uint64(j3))
i += copy(dAtA[i:], dAtA4[:j3])
i--
dAtA[i] = 0x12
}
if len(m.Slashed) > 0 {
dAtA6 := make([]byte, len(m.Slashed)*10)
if len(m.Activated) > 0 {
dAtA6 := make([]byte, len(m.Activated)*10)
var j5 int
for _, num := range m.Slashed {
for _, num := range m.Activated {
for num >= 1<<7 {
dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
@@ -263,57 +317,19 @@ func (m *ArchivedActiveSetChanges) MarshalTo(dAtA []byte) (int, error) {
dAtA6[j5] = uint8(num)
j5++
}
dAtA[i] = 0x22
i++
i -= j5
copy(dAtA[i:], dAtA6[:j5])
i = encodeVarintArchive(dAtA, i, uint64(j5))
i += copy(dAtA[i:], dAtA6[:j5])
i--
dAtA[i] = 0xa
}
if len(m.VoluntaryExits) > 0 {
for _, msg := range m.VoluntaryExits {
dAtA[i] = 0x32
i++
i = encodeVarintArchive(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.ProposerSlashings) > 0 {
for _, msg := range m.ProposerSlashings {
dAtA[i] = 0x3a
i++
i = encodeVarintArchive(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.AttesterSlashings) > 0 {
for _, msg := range m.AttesterSlashings {
dAtA[i] = 0x42
i++
i = encodeVarintArchive(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
return len(dAtA) - i, nil
}
func (m *ArchivedCommitteeInfo) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -321,36 +337,46 @@ func (m *ArchivedCommitteeInfo) Marshal() (dAtA []byte, err error) {
}
func (m *ArchivedCommitteeInfo) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ArchivedCommitteeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.ProposerSeed) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintArchive(dAtA, i, uint64(len(m.ProposerSeed)))
i += copy(dAtA[i:], m.ProposerSeed)
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.AttesterSeed) > 0 {
dAtA[i] = 0x12
i++
i -= len(m.AttesterSeed)
copy(dAtA[i:], m.AttesterSeed)
i = encodeVarintArchive(dAtA, i, uint64(len(m.AttesterSeed)))
i += copy(dAtA[i:], m.AttesterSeed)
i--
dAtA[i] = 0x12
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
if len(m.ProposerSeed) > 0 {
i -= len(m.ProposerSeed)
copy(dAtA[i:], m.ProposerSeed)
i = encodeVarintArchive(dAtA, i, uint64(len(m.ProposerSeed)))
i--
dAtA[i] = 0xa
}
return i, nil
return len(dAtA) - i, nil
}
func encodeVarintArchive(dAtA []byte, offset int, v uint64) int {
offset -= sovArchive(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
return base
}
func (m *ArchivedActiveSetChanges) Size() (n int) {
if m == nil {
@@ -424,14 +450,7 @@ func (m *ArchivedCommitteeInfo) Size() (n int) {
}
func sovArchive(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
return (math_bits.Len64(x|1) + 6) / 7
}
func sozArchive(x uint64) (n int) {
return sovArchive(uint64((x << 1) ^ uint64((int64(x) >> 63))))

View File

@@ -7,6 +7,7 @@ import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
@@ -21,7 +22,7 @@ var _ = math.Inf
// 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
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Status struct {
HeadForkVersion []byte `protobuf:"bytes,1,opt,name=head_fork_version,json=headForkVersion,proto3" json:"head_fork_version,omitempty" ssz-size:"4"`
@@ -48,7 +49,7 @@ func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Status.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -126,7 +127,7 @@ func (m *BeaconBlocksByRangeRequest) XXX_Marshal(b []byte, deterministic bool) (
return xxx_messageInfo_BeaconBlocksByRangeRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -210,7 +211,7 @@ var fileDescriptor_a1d590cda035b632 = []byte{
func (m *Status) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -218,48 +219,57 @@ func (m *Status) Marshal() (dAtA []byte, err error) {
}
func (m *Status) MarshalTo(dAtA []byte) (int, error) {
var i int
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 len(m.HeadForkVersion) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintMessages(dAtA, i, uint64(len(m.HeadForkVersion)))
i += copy(dAtA[i:], m.HeadForkVersion)
}
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.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.HeadSlot != 0 {
dAtA[i] = 0x28
i++
i = encodeVarintMessages(dAtA, i, uint64(m.HeadSlot))
i--
dAtA[i] = 0x28
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
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
}
return i, nil
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.HeadForkVersion) > 0 {
i -= len(m.HeadForkVersion)
copy(dAtA[i:], m.HeadForkVersion)
i = encodeVarintMessages(dAtA, i, uint64(len(m.HeadForkVersion)))
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.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -267,45 +277,54 @@ func (m *BeaconBlocksByRangeRequest) Marshal() (dAtA []byte, err error) {
}
func (m *BeaconBlocksByRangeRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
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 len(m.HeadBlockRoot) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintMessages(dAtA, i, uint64(len(m.HeadBlockRoot)))
i += copy(dAtA[i:], m.HeadBlockRoot)
}
if m.StartSlot != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintMessages(dAtA, i, uint64(m.StartSlot))
}
if m.Count != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintMessages(dAtA, i, uint64(m.Count))
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Step != 0 {
dAtA[i] = 0x20
i++
i = encodeVarintMessages(dAtA, i, uint64(m.Step))
i--
dAtA[i] = 0x20
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
if m.Count != 0 {
i = encodeVarintMessages(dAtA, i, uint64(m.Count))
i--
dAtA[i] = 0x18
}
return i, nil
if m.StartSlot != 0 {
i = encodeVarintMessages(dAtA, i, uint64(m.StartSlot))
i--
dAtA[i] = 0x10
}
if len(m.HeadBlockRoot) > 0 {
i -= len(m.HeadBlockRoot)
copy(dAtA[i:], m.HeadBlockRoot)
i = encodeVarintMessages(dAtA, i, uint64(len(m.HeadBlockRoot)))
i--
dAtA[i] = 0xa
}
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 offset + 1
return base
}
func (m *Status) Size() (n int) {
if m == nil {
@@ -363,14 +382,7 @@ func (m *BeaconBlocksByRangeRequest) Size() (n int) {
}
func sovMessages(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
return (math_bits.Len64(x|1) + 6) / 7
}
func sozMessages(x uint64) (n int) {
return sovMessages(uint64((x << 1) ^ uint64((int64(x) >> 63))))

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -8,9 +8,12 @@ import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/gogo/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// Reference imports to suppress errors if they are not otherwise used.
@@ -22,7 +25,7 @@ var _ = math.Inf
// 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
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type FundingRequest struct {
WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"`
@@ -47,7 +50,7 @@ func (m *FundingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro
return xxx_messageInfo_FundingRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -110,7 +113,7 @@ func (m *FundingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, err
return xxx_messageInfo_FundingResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -215,6 +218,14 @@ type FaucetServiceServer interface {
RequestFunds(context.Context, *FundingRequest) (*FundingResponse, error)
}
// UnimplementedFaucetServiceServer can be embedded to have forward compatible implementations.
type UnimplementedFaucetServiceServer struct {
}
func (*UnimplementedFaucetServiceServer) RequestFunds(ctx context.Context, req *FundingRequest) (*FundingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RequestFunds not implemented")
}
func RegisterFaucetServiceServer(s *grpc.Server, srv FaucetServiceServer) {
s.RegisterService(&_FaucetService_serviceDesc, srv)
}
@@ -253,7 +264,7 @@ var _FaucetService_serviceDesc = grpc.ServiceDesc{
func (m *FundingRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -261,38 +272,47 @@ func (m *FundingRequest) Marshal() (dAtA []byte, err error) {
}
func (m *FundingRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *FundingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.WalletAddress) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintFaucet(dAtA, i, uint64(len(m.WalletAddress)))
i += copy(dAtA[i:], m.WalletAddress)
}
if len(m.RecaptchaSiteKey) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintFaucet(dAtA, i, uint64(len(m.RecaptchaSiteKey)))
i += copy(dAtA[i:], m.RecaptchaSiteKey)
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.RecaptchaResponse) > 0 {
dAtA[i] = 0x1a
i++
i -= len(m.RecaptchaResponse)
copy(dAtA[i:], m.RecaptchaResponse)
i = encodeVarintFaucet(dAtA, i, uint64(len(m.RecaptchaResponse)))
i += copy(dAtA[i:], m.RecaptchaResponse)
i--
dAtA[i] = 0x1a
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
if len(m.RecaptchaSiteKey) > 0 {
i -= len(m.RecaptchaSiteKey)
copy(dAtA[i:], m.RecaptchaSiteKey)
i = encodeVarintFaucet(dAtA, i, uint64(len(m.RecaptchaSiteKey)))
i--
dAtA[i] = 0x12
}
return i, nil
if len(m.WalletAddress) > 0 {
i -= len(m.WalletAddress)
copy(dAtA[i:], m.WalletAddress)
i = encodeVarintFaucet(dAtA, i, uint64(len(m.WalletAddress)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *FundingResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -300,42 +320,53 @@ func (m *FundingResponse) Marshal() (dAtA []byte, err error) {
}
func (m *FundingResponse) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *FundingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Error) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintFaucet(dAtA, i, uint64(len(m.Error)))
i += copy(dAtA[i:], m.Error)
}
if len(m.Amount) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintFaucet(dAtA, i, uint64(len(m.Amount)))
i += copy(dAtA[i:], m.Amount)
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.TransactionHash) > 0 {
dAtA[i] = 0x1a
i++
i -= len(m.TransactionHash)
copy(dAtA[i:], m.TransactionHash)
i = encodeVarintFaucet(dAtA, i, uint64(len(m.TransactionHash)))
i += copy(dAtA[i:], m.TransactionHash)
i--
dAtA[i] = 0x1a
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
if len(m.Amount) > 0 {
i -= len(m.Amount)
copy(dAtA[i:], m.Amount)
i = encodeVarintFaucet(dAtA, i, uint64(len(m.Amount)))
i--
dAtA[i] = 0x12
}
return i, nil
if len(m.Error) > 0 {
i -= len(m.Error)
copy(dAtA[i:], m.Error)
i = encodeVarintFaucet(dAtA, i, uint64(len(m.Error)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintFaucet(dAtA []byte, offset int, v uint64) int {
offset -= sovFaucet(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
return base
}
func (m *FundingRequest) Size() (n int) {
if m == nil {
@@ -386,14 +417,7 @@ func (m *FundingResponse) Size() (n int) {
}
func sovFaucet(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
return (math_bits.Len64(x|1) + 6) / 7
}
func sozFaucet(x uint64) (n int) {
return sovFaucet(uint64((x << 1) ^ uint64((int64(x) >> 63))))

0
proto/slashing/slashing.pb.go generated Normal file → Executable file
View File

323
proto/testing/test.pb.go generated
View File

@@ -7,6 +7,7 @@ import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
@@ -22,7 +23,7 @@ var _ = math.Inf
// 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
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Person_PhoneType int32
@@ -74,7 +75,7 @@ func (m *TestMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
return xxx_messageInfo_TestMessage.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -129,7 +130,7 @@ func (m *TestNestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, e
return xxx_messageInfo_TestNestedMessage.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -184,7 +185,7 @@ func (m *Puzzle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Puzzle.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -242,7 +243,7 @@ func (m *Person) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Person.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -318,7 +319,7 @@ func (m *Person_PhoneNumber) XXX_Marshal(b []byte, deterministic bool) ([]byte,
return xxx_messageInfo_Person_PhoneNumber.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -372,7 +373,7 @@ func (m *AddressBook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
return xxx_messageInfo_AddressBook.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -420,7 +421,7 @@ func (m *TestSimpleMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, e
return xxx_messageInfo_TestSimpleMessage.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
@@ -505,7 +506,7 @@ var fileDescriptor_1f902154cb7707ef = []byte{
func (m *TestMessage) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -513,32 +514,40 @@ func (m *TestMessage) Marshal() (dAtA []byte, err error) {
}
func (m *TestMessage) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *TestMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Foo) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTest(dAtA, i, uint64(len(m.Foo)))
i += copy(dAtA[i:], m.Foo)
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Bar) > 0 {
dAtA[i] = 0x12
i++
i -= len(m.Bar)
copy(dAtA[i:], m.Bar)
i = encodeVarintTest(dAtA, i, uint64(len(m.Bar)))
i += copy(dAtA[i:], m.Bar)
i--
dAtA[i] = 0x12
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
if len(m.Foo) > 0 {
i -= len(m.Foo)
copy(dAtA[i:], m.Foo)
i = encodeVarintTest(dAtA, i, uint64(len(m.Foo)))
i--
dAtA[i] = 0xa
}
return i, nil
return len(dAtA) - i, nil
}
func (m *TestNestedMessage) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -546,36 +555,45 @@ func (m *TestNestedMessage) Marshal() (dAtA []byte, err error) {
}
func (m *TestNestedMessage) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *TestNestedMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Fuzz) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTest(dAtA, i, uint64(len(m.Fuzz)))
i += copy(dAtA[i:], m.Fuzz)
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Msg != nil {
dAtA[i] = 0x12
i++
i = encodeVarintTest(dAtA, i, uint64(m.Msg.Size()))
n1, err := m.Msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
{
size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTest(dAtA, i, uint64(size))
}
i += n1
i--
dAtA[i] = 0x12
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
if len(m.Fuzz) > 0 {
i -= len(m.Fuzz)
copy(dAtA[i:], m.Fuzz)
i = encodeVarintTest(dAtA, i, uint64(len(m.Fuzz)))
i--
dAtA[i] = 0xa
}
return i, nil
return len(dAtA) - i, nil
}
func (m *Puzzle) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -583,32 +601,40 @@ func (m *Puzzle) Marshal() (dAtA []byte, err error) {
}
func (m *Puzzle) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Puzzle) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Challenge) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTest(dAtA, i, uint64(len(m.Challenge)))
i += copy(dAtA[i:], m.Challenge)
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Answer) > 0 {
dAtA[i] = 0x12
i++
i -= len(m.Answer)
copy(dAtA[i:], m.Answer)
i = encodeVarintTest(dAtA, i, uint64(len(m.Answer)))
i += copy(dAtA[i:], m.Answer)
i--
dAtA[i] = 0x12
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
if len(m.Challenge) > 0 {
i -= len(m.Challenge)
copy(dAtA[i:], m.Challenge)
i = encodeVarintTest(dAtA, i, uint64(len(m.Challenge)))
i--
dAtA[i] = 0xa
}
return i, nil
return len(dAtA) - i, nil
}
func (m *Person) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -616,59 +642,71 @@ func (m *Person) Marshal() (dAtA []byte, err error) {
}
func (m *Person) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Person) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Name) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTest(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Id != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintTest(dAtA, i, uint64(m.Id))
}
if len(m.Email) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTest(dAtA, i, uint64(len(m.Email)))
i += copy(dAtA[i:], m.Email)
}
if len(m.Phones) > 0 {
for _, msg := range m.Phones {
dAtA[i] = 0x22
i++
i = encodeVarintTest(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if m.LastUpdated != nil {
{
size, err := m.LastUpdated.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i += n
i -= size
i = encodeVarintTest(dAtA, i, uint64(size))
}
}
if m.LastUpdated != nil {
i--
dAtA[i] = 0x2a
i++
i = encodeVarintTest(dAtA, i, uint64(m.LastUpdated.Size()))
n2, err := m.LastUpdated.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
if len(m.Phones) > 0 {
for iNdEx := len(m.Phones) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Phones[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTest(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
}
i += n2
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
if len(m.Email) > 0 {
i -= len(m.Email)
copy(dAtA[i:], m.Email)
i = encodeVarintTest(dAtA, i, uint64(len(m.Email)))
i--
dAtA[i] = 0x1a
}
return i, nil
if m.Id != 0 {
i = encodeVarintTest(dAtA, i, uint64(m.Id))
i--
dAtA[i] = 0x10
}
if len(m.Name) > 0 {
i -= len(m.Name)
copy(dAtA[i:], m.Name)
i = encodeVarintTest(dAtA, i, uint64(len(m.Name)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Person_PhoneNumber) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -676,31 +714,38 @@ func (m *Person_PhoneNumber) Marshal() (dAtA []byte, err error) {
}
func (m *Person_PhoneNumber) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Person_PhoneNumber) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Number) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTest(dAtA, i, uint64(len(m.Number)))
i += copy(dAtA[i:], m.Number)
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Type != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintTest(dAtA, i, uint64(m.Type))
i--
dAtA[i] = 0x10
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
if len(m.Number) > 0 {
i -= len(m.Number)
copy(dAtA[i:], m.Number)
i = encodeVarintTest(dAtA, i, uint64(len(m.Number)))
i--
dAtA[i] = 0xa
}
return i, nil
return len(dAtA) - i, nil
}
func (m *AddressBook) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -708,32 +753,40 @@ func (m *AddressBook) Marshal() (dAtA []byte, err error) {
}
func (m *AddressBook) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AddressBook) 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.People) > 0 {
for _, msg := range m.People {
dAtA[i] = 0xa
i++
i = encodeVarintTest(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
for iNdEx := len(m.People) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.People[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTest(dAtA, i, uint64(size))
}
i += n
i--
dAtA[i] = 0xa
}
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
return len(dAtA) - i, nil
}
func (m *TestSimpleMessage) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
@@ -741,35 +794,44 @@ func (m *TestSimpleMessage) Marshal() (dAtA []byte, err error) {
}
func (m *TestSimpleMessage) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *TestSimpleMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Foo) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTest(dAtA, i, uint64(len(m.Foo)))
i += copy(dAtA[i:], m.Foo)
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Bar != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintTest(dAtA, i, uint64(m.Bar))
i--
dAtA[i] = 0x10
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
if len(m.Foo) > 0 {
i -= len(m.Foo)
copy(dAtA[i:], m.Foo)
i = encodeVarintTest(dAtA, i, uint64(len(m.Foo)))
i--
dAtA[i] = 0xa
}
return i, nil
return len(dAtA) - i, nil
}
func encodeVarintTest(dAtA []byte, offset int, v uint64) int {
offset -= sovTest(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
return base
}
func (m *TestMessage) Size() (n int) {
if m == nil {
@@ -921,14 +983,7 @@ func (m *TestSimpleMessage) Size() (n int) {
}
func sovTest(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
return (math_bits.Len64(x|1) + 6) / 7
}
func sozTest(x uint64) (n int) {
return sovTest(uint64((x << 1) ^ uint64((int64(x) >> 63))))

View File

@@ -13,13 +13,14 @@ while IFS= read -d $'\0' -r file ; do
done < <(find -L $(bazel info bazel-bin)/proto -type f -name "*pb.go" -print0)
arraylength=${#file_list[@]}
searchstring="prysm/"
searchstring="prysmaticlabs/prysm/"
# Copy pb.go files from bazel-bin to original folder where .proto is.
for (( i=0; i<${arraylength}; i++ ));
do
destination=${file_list[i]#*$searchstring}
chmod 755 "$destination"
cp -R -L "${file_list[i]}" "$destination"
done