Browse Source

proto: regenerate proto (#4730)

- regenerate proto using docker image
- on proto breakage a different compiler is used to generate some more helper functions, on master the same one os not used, reverting back to the one used on master to undo further confusion till proto-breakage is merged

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
pull/4735/head
Marko 5 years ago
committed by GitHub
parent
commit
3fedc43c0a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 787 additions and 11555 deletions
  1. +39
    -561
      proto/crypto/keys/types.pb.go
  2. +27
    -605
      proto/evidence/msgs.pb.go
  3. +15
    -413
      proto/libs/bits/types.pb.go
  4. +102
    -1953
      proto/state/types.pb.go
  5. +19
    -482
      proto/types/block.pb.go
  6. +71
    -1335
      proto/types/evidence.pb.go
  7. +92
    -1243
      proto/types/params.pb.go
  8. +342
    -3678
      proto/types/types.pb.go
  9. +49
    -759
      proto/types/validator.pb.go
  10. +31
    -526
      proto/version/version.pb.go

+ 39
- 561
proto/crypto/keys/types.pb.go View File

@ -8,11 +8,7 @@ import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
io "io"
math "math"
math_bits "math/bits"
reflect "reflect"
strings "strings"
)
// Reference imports to suppress errors if they are not otherwise used.
@ -29,34 +25,29 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type PublicKey struct {
// Types that are valid to be assigned to Sum:
// *PublicKey_Ed25519
Sum isPublicKey_Sum `protobuf_oneof:"sum"`
Sum isPublicKey_Sum `protobuf_oneof:"sum"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PublicKey) Reset() { *m = PublicKey{} }
func (*PublicKey) ProtoMessage() {}
func (m *PublicKey) Reset() { *m = PublicKey{} }
func (m *PublicKey) String() string { return proto.CompactTextString(m) }
func (*PublicKey) ProtoMessage() {}
func (*PublicKey) Descriptor() ([]byte, []int) {
return fileDescriptor_943d79b57ec0188f, []int{0}
}
func (m *PublicKey) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
return xxx_messageInfo_PublicKey.Unmarshal(m, b)
}
func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PublicKey.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
return xxx_messageInfo_PublicKey.Marshal(b, m, deterministic)
}
func (m *PublicKey) XXX_Merge(src proto.Message) {
xxx_messageInfo_PublicKey.Merge(m, src)
}
func (m *PublicKey) XXX_Size() int {
return m.Size()
return xxx_messageInfo_PublicKey.Size(m)
}
func (m *PublicKey) XXX_DiscardUnknown() {
xxx_messageInfo_PublicKey.DiscardUnknown(m)
@ -67,8 +58,6 @@ var xxx_messageInfo_PublicKey proto.InternalMessageInfo
type isPublicKey_Sum interface {
isPublicKey_Sum()
Equal(interface{}) bool
MarshalTo([]byte) (int, error)
Size() int
Compare(interface{}) int
}
@ -103,34 +92,29 @@ func (*PublicKey) XXX_OneofWrappers() []interface{} {
type PrivateKey struct {
// Types that are valid to be assigned to Sum:
// *PrivateKey_Ed25519
Sum isPrivateKey_Sum `protobuf_oneof:"sum"`
Sum isPrivateKey_Sum `protobuf_oneof:"sum"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PrivateKey) Reset() { *m = PrivateKey{} }
func (*PrivateKey) ProtoMessage() {}
func (m *PrivateKey) Reset() { *m = PrivateKey{} }
func (m *PrivateKey) String() string { return proto.CompactTextString(m) }
func (*PrivateKey) ProtoMessage() {}
func (*PrivateKey) Descriptor() ([]byte, []int) {
return fileDescriptor_943d79b57ec0188f, []int{1}
}
func (m *PrivateKey) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
return xxx_messageInfo_PrivateKey.Unmarshal(m, b)
}
func (m *PrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PrivateKey.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
return xxx_messageInfo_PrivateKey.Marshal(b, m, deterministic)
}
func (m *PrivateKey) XXX_Merge(src proto.Message) {
xxx_messageInfo_PrivateKey.Merge(m, src)
}
func (m *PrivateKey) XXX_Size() int {
return m.Size()
return xxx_messageInfo_PrivateKey.Size(m)
}
func (m *PrivateKey) XXX_DiscardUnknown() {
xxx_messageInfo_PrivateKey.DiscardUnknown(m)
@ -141,8 +125,6 @@ var xxx_messageInfo_PrivateKey proto.InternalMessageInfo
type isPrivateKey_Sum interface {
isPrivateKey_Sum()
Equal(interface{}) bool
MarshalTo([]byte) (int, error)
Size() int
Compare(interface{}) int
}
@ -181,7 +163,7 @@ func init() {
func init() { proto.RegisterFile("proto/crypto/keys/types.proto", fileDescriptor_943d79b57ec0188f) }
var fileDescriptor_943d79b57ec0188f = []byte{
// 241 bytes of a gzipped FileDescriptorProto
// 190 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0x28, 0xca, 0x2f,
0xc9, 0xd7, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0xcf, 0x4e, 0xad, 0x2c, 0xd6, 0x2f, 0xa9,
0x2c, 0x48, 0x2d, 0xd6, 0x03, 0x8b, 0x0b, 0xc9, 0x94, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66,
@ -190,14 +172,10 @@ var fileDescriptor_943d79b57ec0188f = []byte{
0x10, 0x3d, 0x4a, 0x7a, 0x5c, 0x9c, 0x01, 0xa5, 0x49, 0x39, 0x99, 0xc9, 0xde, 0xa9, 0x95, 0x42,
0x52, 0x5c, 0xec, 0xa9, 0x29, 0x46, 0xa6, 0xa6, 0x86, 0x96, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x3c,
0x1e, 0x0c, 0x41, 0x30, 0x01, 0x27, 0x56, 0x2e, 0xe6, 0xe2, 0xd2, 0x5c, 0x25, 0x7d, 0x2e, 0xae,
0x80, 0xa2, 0xcc, 0xb2, 0xc4, 0x92, 0x54, 0xe2, 0x34, 0x38, 0x15, 0x5c, 0x78, 0x28, 0xc7, 0x70,
0xe3, 0xa1, 0x1c, 0xc3, 0x87, 0x87, 0x72, 0x8c, 0x3f, 0x1e, 0xca, 0x31, 0x36, 0x3c, 0x92, 0x63,
0x5c, 0xf1, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92,
0x63, 0x7c, 0xf1, 0x48, 0x8e, 0xe1, 0xc3, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x56, 0x3c,
0x96, 0x63, 0xbc, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa3, 0xf4, 0xcc, 0x92,
0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x84, 0x7f, 0x91, 0x99, 0x18, 0x81, 0x94, 0xc4,
0x06, 0x16, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x04, 0x1c, 0xae, 0x61, 0x40, 0x01, 0x00,
0x00,
0x80, 0xa2, 0xcc, 0xb2, 0xc4, 0x92, 0x54, 0xe2, 0x34, 0x38, 0x39, 0xfc, 0x78, 0x28, 0xc7, 0xb8,
0xe2, 0x91, 0x1c, 0xe3, 0x8a, 0xc7, 0x72, 0x8c, 0x51, 0x46, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49,
0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x08, 0xf7, 0x23, 0x33, 0x31, 0x3c, 0x9d, 0xc4, 0x06, 0x16, 0x32,
0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x99, 0x5e, 0xad, 0xbd, 0x10, 0x01, 0x00, 0x00,
}
func (this *PublicKey) Compare(that interface{}) int {
@ -256,6 +234,9 @@ func (this *PublicKey) Compare(that interface{}) int {
return 1
}
}
if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
return c
}
return 0
}
func (this *PublicKey_Ed25519) Compare(that interface{}) int {
@ -344,6 +325,9 @@ func (this *PrivateKey) Compare(that interface{}) int {
return 1
}
}
if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
return c
}
return 0
}
func (this *PrivateKey_Ed25519) Compare(that interface{}) int {
@ -404,6 +388,9 @@ func (this *PublicKey) Equal(that interface{}) bool {
} else if !this.Sum.Equal(that1.Sum) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *PublicKey_Ed25519) Equal(that interface{}) bool {
@ -458,6 +445,9 @@ func (this *PrivateKey) Equal(that interface{}) bool {
} else if !this.Sum.Equal(that1.Sum) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *PrivateKey_Ed25519) Equal(that interface{}) bool {
@ -484,161 +474,6 @@ func (this *PrivateKey_Ed25519) Equal(that interface{}) bool {
}
return true
}
func (this *PublicKey) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&keys.PublicKey{")
if this.Sum != nil {
s = append(s, "Sum: "+fmt.Sprintf("%#v", this.Sum)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *PublicKey_Ed25519) GoString() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&keys.PublicKey_Ed25519{` +
`Ed25519:` + fmt.Sprintf("%#v", this.Ed25519) + `}`}, ", ")
return s
}
func (this *PrivateKey) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&keys.PrivateKey{")
if this.Sum != nil {
s = append(s, "Sum: "+fmt.Sprintf("%#v", this.Sum)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *PrivateKey_Ed25519) GoString() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&keys.PrivateKey_Ed25519{` +
`Ed25519:` + fmt.Sprintf("%#v", this.Ed25519) + `}`}, ", ")
return s
}
func valueToGoStringTypes(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func (m *PublicKey) 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 *PublicKey) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Sum != nil {
{
size := m.Sum.Size()
i -= size
if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
return len(dAtA) - i, nil
}
func (m *PublicKey_Ed25519) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PublicKey_Ed25519) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
if m.Ed25519 != nil {
i -= len(m.Ed25519)
copy(dAtA[i:], m.Ed25519)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Ed25519)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *PrivateKey) 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 *PrivateKey) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PrivateKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Sum != nil {
{
size := m.Sum.Size()
i -= size
if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
return len(dAtA) - i, nil
}
func (m *PrivateKey_Ed25519) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PrivateKey_Ed25519) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
if m.Ed25519 != nil {
i -= len(m.Ed25519)
copy(dAtA[i:], m.Ed25519)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Ed25519)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
offset -= sovTypes(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func NewPopulatedPublicKey(r randyTypes, easy bool) *PublicKey {
this := &PublicKey{}
oneofNumber_Sum := []int32{1}[r.Intn(1)]
@ -647,6 +482,7 @@ func NewPopulatedPublicKey(r randyTypes, easy bool) *PublicKey {
this.Sum = NewPopulatedPublicKey_Ed25519(r, easy)
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedTypes(r, 2)
}
return this
}
@ -668,6 +504,7 @@ func NewPopulatedPrivateKey(r randyTypes, easy bool) *PrivateKey {
this.Sum = NewPopulatedPrivateKey_Ed25519(r, easy)
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedTypes(r, 2)
}
return this
}
@ -754,362 +591,3 @@ func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte {
dAtA = append(dAtA, uint8(v))
return dAtA
}
func (m *PublicKey) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Sum != nil {
n += m.Sum.Size()
}
return n
}
func (m *PublicKey_Ed25519) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Ed25519 != nil {
l = len(m.Ed25519)
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *PrivateKey) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Sum != nil {
n += m.Sum.Size()
}
return n
}
func (m *PrivateKey_Ed25519) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Ed25519 != nil {
l = len(m.Ed25519)
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func sovTypes(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozTypes(x uint64) (n int) {
return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *PublicKey) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PublicKey{`,
`Sum:` + fmt.Sprintf("%v", this.Sum) + `,`,
`}`,
}, "")
return s
}
func (this *PublicKey_Ed25519) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PublicKey_Ed25519{`,
`Ed25519:` + fmt.Sprintf("%v", this.Ed25519) + `,`,
`}`,
}, "")
return s
}
func (this *PrivateKey) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PrivateKey{`,
`Sum:` + fmt.Sprintf("%v", this.Sum) + `,`,
`}`,
}, "")
return s
}
func (this *PrivateKey_Ed25519) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PrivateKey_Ed25519{`,
`Ed25519:` + fmt.Sprintf("%v", this.Ed25519) + `,`,
`}`,
}, "")
return s
}
func valueToStringTypes(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *PublicKey) 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 ErrIntOverflowTypes
}
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: PublicKey: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PublicKey: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Ed25519", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := make([]byte, postIndex-iNdEx)
copy(v, dAtA[iNdEx:postIndex])
m.Sum = &PublicKey_Ed25519{v}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PrivateKey) 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 ErrIntOverflowTypes
}
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: PrivateKey: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PrivateKey: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Ed25519", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := make([]byte, postIndex-iNdEx)
copy(v, dAtA[iNdEx:postIndex])
m.Sum = &PrivateKey_Ed25519{v}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipTypes(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, ErrIntOverflowTypes
}
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, ErrIntOverflowTypes
}
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, ErrIntOverflowTypes
}
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, ErrInvalidLengthTypes
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupTypes
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthTypes
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)

+ 27
- 605
proto/evidence/msgs.pb.go View File

@ -8,11 +8,7 @@ import (
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
types "github.com/tendermint/tendermint/proto/types"
io "io"
math "math"
math_bits "math/bits"
reflect "reflect"
strings "strings"
)
// Reference imports to suppress errors if they are not otherwise used.
@ -27,34 +23,29 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type List struct {
Evidence []types.Evidence `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence"`
Evidence []types.Evidence `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *List) Reset() { *m = List{} }
func (*List) ProtoMessage() {}
func (m *List) Reset() { *m = List{} }
func (m *List) String() string { return proto.CompactTextString(m) }
func (*List) ProtoMessage() {}
func (*List) Descriptor() ([]byte, []int) {
return fileDescriptor_df8322769b0bd7d6, []int{0}
}
func (m *List) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
return xxx_messageInfo_List.Unmarshal(m, b)
}
func (m *List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_List.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
return xxx_messageInfo_List.Marshal(b, m, deterministic)
}
func (m *List) XXX_Merge(src proto.Message) {
xxx_messageInfo_List.Merge(m, src)
}
func (m *List) XXX_Size() int {
return m.Size()
return xxx_messageInfo_List.Size(m)
}
func (m *List) XXX_DiscardUnknown() {
xxx_messageInfo_List.DiscardUnknown(m)
@ -70,36 +61,31 @@ func (m *List) GetEvidence() []types.Evidence {
}
type Info struct {
Committed bool `protobuf:"varint,1,opt,name=committed,proto3" json:"committed,omitempty"`
Priority int64 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"`
Evidence types.Evidence `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"`
Committed bool `protobuf:"varint,1,opt,name=committed,proto3" json:"committed,omitempty"`
Priority int64 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"`
Evidence types.Evidence `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Info) Reset() { *m = Info{} }
func (*Info) ProtoMessage() {}
func (m *Info) Reset() { *m = Info{} }
func (m *Info) String() string { return proto.CompactTextString(m) }
func (*Info) ProtoMessage() {}
func (*Info) Descriptor() ([]byte, []int) {
return fileDescriptor_df8322769b0bd7d6, []int{1}
}
func (m *Info) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
return xxx_messageInfo_Info.Unmarshal(m, b)
}
func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Info.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
return xxx_messageInfo_Info.Marshal(b, m, deterministic)
}
func (m *Info) XXX_Merge(src proto.Message) {
xxx_messageInfo_Info.Merge(m, src)
}
func (m *Info) XXX_Size() int {
return m.Size()
return xxx_messageInfo_Info.Size(m)
}
func (m *Info) XXX_DiscardUnknown() {
xxx_messageInfo_Info.DiscardUnknown(m)
@ -136,7 +122,7 @@ func init() {
func init() { proto.RegisterFile("proto/evidence/msgs.proto", fileDescriptor_df8322769b0bd7d6) }
var fileDescriptor_df8322769b0bd7d6 = []byte{
// 283 bytes of a gzipped FileDescriptorProto
// 228 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0x28, 0xca, 0x2f,
0xc9, 0xd7, 0x4f, 0x2d, 0xcb, 0x4c, 0x49, 0xcd, 0x4b, 0x4e, 0xd5, 0xcf, 0x2d, 0x4e, 0x2f, 0xd6,
0x03, 0x8b, 0x09, 0x49, 0x96, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, 0x40, 0x44,
@ -148,572 +134,8 @@ var fileDescriptor_df8322769b0bd7d6 = []byte{
0x53, 0x6a, 0x61, 0xe4, 0x62, 0xf1, 0xcc, 0x4b, 0xcb, 0x17, 0x92, 0xe1, 0xe2, 0x4c, 0xce, 0xcf,
0xcd, 0xcd, 0x2c, 0x29, 0x49, 0x4d, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x08, 0x42, 0x08, 0x08,
0x49, 0x71, 0x71, 0x14, 0x14, 0x65, 0xe6, 0x17, 0x65, 0x96, 0x54, 0x4a, 0x30, 0x29, 0x30, 0x6a,
0x30, 0x07, 0xc1, 0xf9, 0x28, 0xce, 0x60, 0x56, 0x60, 0x24, 0xc7, 0x19, 0x4e, 0xa9, 0x17, 0x1e,
0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15,
0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6,
0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39,
0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xf4, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3,
0x73, 0xf5, 0x11, 0x36, 0x22, 0x33, 0x51, 0xe3, 0x28, 0x89, 0x0d, 0xcc, 0x37, 0x06, 0x04, 0x00,
0x00, 0xff, 0xff, 0x2c, 0xf3, 0x8d, 0x9c, 0xbc, 0x01, 0x00, 0x00,
}
func (this *List) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*List)
if !ok {
that2, ok := that.(List)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if len(this.Evidence) != len(that1.Evidence) {
return false
}
for i := range this.Evidence {
if !this.Evidence[i].Equal(&that1.Evidence[i]) {
return false
}
}
return true
0x30, 0x07, 0xc1, 0xf9, 0x28, 0xce, 0x60, 0x56, 0x60, 0x24, 0xc7, 0x19, 0x4e, 0x86, 0x51, 0xfa,
0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x08, 0xdd, 0xc8, 0x4c, 0xd4,
0xf0, 0x4e, 0x62, 0x03, 0xf3, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x66, 0x20, 0x26,
0x88, 0x01, 0x00, 0x00,
}
func (this *Info) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Info)
if !ok {
that2, ok := that.(Info)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Committed != that1.Committed {
return false
}
if this.Priority != that1.Priority {
return false
}
if !this.Evidence.Equal(&that1.Evidence) {
return false
}
return true
}
func (this *List) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&evidence.List{")
if this.Evidence != nil {
vs := make([]types.Evidence, len(this.Evidence))
for i := range vs {
vs[i] = this.Evidence[i]
}
s = append(s, "Evidence: "+fmt.Sprintf("%#v", vs)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Info) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 7)
s = append(s, "&evidence.Info{")
s = append(s, "Committed: "+fmt.Sprintf("%#v", this.Committed)+",\n")
s = append(s, "Priority: "+fmt.Sprintf("%#v", this.Priority)+",\n")
s = append(s, "Evidence: "+strings.Replace(this.Evidence.GoString(), `&`, ``, 1)+",\n")
s = append(s, "}")
return strings.Join(s, "")
}
func valueToGoStringMsgs(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func (m *List) 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 *List) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *List) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Evidence) > 0 {
for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintMsgs(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *Info) 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 *Info) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
{
size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintMsgs(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
if m.Priority != 0 {
i = encodeVarintMsgs(dAtA, i, uint64(m.Priority))
i--
dAtA[i] = 0x10
}
if m.Committed {
i--
if m.Committed {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintMsgs(dAtA []byte, offset int, v uint64) int {
offset -= sovMsgs(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *List) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Evidence) > 0 {
for _, e := range m.Evidence {
l = e.Size()
n += 1 + l + sovMsgs(uint64(l))
}
}
return n
}
func (m *Info) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Committed {
n += 2
}
if m.Priority != 0 {
n += 1 + sovMsgs(uint64(m.Priority))
}
l = m.Evidence.Size()
n += 1 + l + sovMsgs(uint64(l))
return n
}
func sovMsgs(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozMsgs(x uint64) (n int) {
return sovMsgs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *List) String() string {
if this == nil {
return "nil"
}
repeatedStringForEvidence := "[]Evidence{"
for _, f := range this.Evidence {
repeatedStringForEvidence += fmt.Sprintf("%v", f) + ","
}
repeatedStringForEvidence += "}"
s := strings.Join([]string{`&List{`,
`Evidence:` + repeatedStringForEvidence + `,`,
`}`,
}, "")
return s
}
func (this *Info) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Info{`,
`Committed:` + fmt.Sprintf("%v", this.Committed) + `,`,
`Priority:` + fmt.Sprintf("%v", this.Priority) + `,`,
`Evidence:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Evidence), "Evidence", "types.Evidence", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func valueToStringMsgs(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *List) 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 ErrIntOverflowMsgs
}
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: List: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: List: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthMsgs
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthMsgs
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Evidence = append(m.Evidence, types.Evidence{})
if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMsgs(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthMsgs
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthMsgs
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Info) 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 ErrIntOverflowMsgs
}
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: Info: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Info: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Committed", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Committed = bool(v != 0)
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType)
}
m.Priority = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Priority |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthMsgs
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthMsgs
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMsgs(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthMsgs
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthMsgs
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipMsgs(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, ErrIntOverflowMsgs
}
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, ErrIntOverflowMsgs
}
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, ErrIntOverflowMsgs
}
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, ErrInvalidLengthMsgs
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupMsgs
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthMsgs
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthMsgs = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowMsgs = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupMsgs = fmt.Errorf("proto: unexpected end of group")
)

+ 15
- 413
proto/libs/bits/types.pb.go View File

@ -6,11 +6,7 @@ package bits
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
io "io"
math "math"
math_bits "math/bits"
reflect "reflect"
strings "strings"
)
// Reference imports to suppress errors if they are not otherwise used.
@ -25,35 +21,30 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type BitArray struct {
Bits int64 `protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"`
Elems []uint64 `protobuf:"varint,2,rep,packed,name=elems,proto3" json:"elems,omitempty"`
Bits int64 `protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"`
Elems []uint64 `protobuf:"varint,2,rep,packed,name=elems,proto3" json:"elems,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BitArray) Reset() { *m = BitArray{} }
func (*BitArray) ProtoMessage() {}
func (m *BitArray) Reset() { *m = BitArray{} }
func (m *BitArray) String() string { return proto.CompactTextString(m) }
func (*BitArray) ProtoMessage() {}
func (*BitArray) Descriptor() ([]byte, []int) {
return fileDescriptor_3f1fbe70d7999e09, []int{0}
}
func (m *BitArray) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
return xxx_messageInfo_BitArray.Unmarshal(m, b)
}
func (m *BitArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BitArray.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
return xxx_messageInfo_BitArray.Marshal(b, m, deterministic)
}
func (m *BitArray) XXX_Merge(src proto.Message) {
xxx_messageInfo_BitArray.Merge(m, src)
}
func (m *BitArray) XXX_Size() int {
return m.Size()
return xxx_messageInfo_BitArray.Size(m)
}
func (m *BitArray) XXX_DiscardUnknown() {
xxx_messageInfo_BitArray.DiscardUnknown(m)
@ -82,403 +73,14 @@ func init() {
func init() { proto.RegisterFile("proto/libs/bits/types.proto", fileDescriptor_3f1fbe70d7999e09) }
var fileDescriptor_3f1fbe70d7999e09 = []byte{
// 196 bytes of a gzipped FileDescriptorProto
// 140 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x28, 0xca, 0x2f,
0xc9, 0xd7, 0xcf, 0xc9, 0x4c, 0x2a, 0xd6, 0x4f, 0xca, 0x2c, 0x29, 0xd6, 0x2f, 0xa9, 0x2c, 0x48,
0x2d, 0xd6, 0x03, 0x8b, 0x0a, 0x49, 0x95, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95,
0x40, 0x44, 0xf4, 0x40, 0xea, 0xf4, 0x40, 0xea, 0x94, 0x4c, 0xb8, 0x38, 0x9c, 0x32, 0x4b, 0x1c,
0x8b, 0x8a, 0x12, 0x2b, 0x85, 0x84, 0xb8, 0x58, 0x40, 0x62, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc,
0x41, 0x60, 0xb6, 0x90, 0x08, 0x17, 0x6b, 0x6a, 0x4e, 0x6a, 0x6e, 0xb1, 0x04, 0x93, 0x02, 0xb3,
0x06, 0x4b, 0x10, 0x84, 0xe3, 0x94, 0x76, 0xe1, 0xa1, 0x1c, 0xc3, 0x8d, 0x87, 0x72, 0x0c, 0x1f,
0x1e, 0xca, 0x31, 0x36, 0x3c, 0x92, 0x63, 0x5c, 0xf1, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6,
0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x7c, 0xf1, 0x48, 0x8e, 0xe1, 0xc3, 0x23, 0x39,
0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x20,
0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xe1, 0x24, 0x64, 0x26, 0x9a,
0x2f, 0x92, 0xd8, 0xc0, 0x02, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4f, 0x31, 0xea, 0x25,
0xdf, 0x00, 0x00, 0x00,
}
func (this *BitArray) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*BitArray)
if !ok {
that2, ok := that.(BitArray)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Bits != that1.Bits {
return false
}
if len(this.Elems) != len(that1.Elems) {
return false
}
for i := range this.Elems {
if this.Elems[i] != that1.Elems[i] {
return false
}
}
return true
}
func (this *BitArray) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 6)
s = append(s, "&bits.BitArray{")
s = append(s, "Bits: "+fmt.Sprintf("%#v", this.Bits)+",\n")
s = append(s, "Elems: "+fmt.Sprintf("%#v", this.Elems)+",\n")
s = append(s, "}")
return strings.Join(s, "")
0x06, 0x4b, 0x10, 0x84, 0xe3, 0x64, 0x14, 0x65, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97,
0x9c, 0x9f, 0xab, 0x8f, 0x30, 0x1e, 0x99, 0x89, 0xe6, 0xa2, 0x24, 0x36, 0xb0, 0x80, 0x31, 0x20,
0x00, 0x00, 0xff, 0xff, 0x49, 0xc4, 0x52, 0x81, 0xab, 0x00, 0x00, 0x00,
}
func valueToGoStringTypes(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func (m *BitArray) 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 *BitArray) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *BitArray) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Elems) > 0 {
dAtA2 := make([]byte, len(m.Elems)*10)
var j1 int
for _, num := range m.Elems {
for num >= 1<<7 {
dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j1++
}
dAtA2[j1] = uint8(num)
j1++
}
i -= j1
copy(dAtA[i:], dAtA2[:j1])
i = encodeVarintTypes(dAtA, i, uint64(j1))
i--
dAtA[i] = 0x12
}
if m.Bits != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.Bits))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
offset -= sovTypes(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *BitArray) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Bits != 0 {
n += 1 + sovTypes(uint64(m.Bits))
}
if len(m.Elems) > 0 {
l = 0
for _, e := range m.Elems {
l += sovTypes(uint64(e))
}
n += 1 + sovTypes(uint64(l)) + l
}
return n
}
func sovTypes(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozTypes(x uint64) (n int) {
return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *BitArray) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&BitArray{`,
`Bits:` + fmt.Sprintf("%v", this.Bits) + `,`,
`Elems:` + fmt.Sprintf("%v", this.Elems) + `,`,
`}`,
}, "")
return s
}
func valueToStringTypes(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *BitArray) 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 ErrIntOverflowTypes
}
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: BitArray: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: BitArray: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Bits", wireType)
}
m.Bits = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Bits |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType == 0 {
var v uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Elems = append(m.Elems, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + packedLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
var elementCount int
var count int
for _, integer := range dAtA[iNdEx:postIndex] {
if integer < 128 {
count++
}
}
elementCount = count
if elementCount != 0 && len(m.Elems) == 0 {
m.Elems = make([]uint64, 0, elementCount)
}
for iNdEx < postIndex {
var v uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Elems = append(m.Elems, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field Elems", wireType)
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipTypes(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, ErrIntOverflowTypes
}
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, ErrIntOverflowTypes
}
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, ErrIntOverflowTypes
}
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, ErrInvalidLengthTypes
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupTypes
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthTypes
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)

+ 102
- 1953
proto/state/types.pb.go
File diff suppressed because it is too large
View File


+ 19
- 482
proto/types/block.pb.go View File

@ -7,11 +7,7 @@ import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
io "io"
math "math"
math_bits "math/bits"
reflect "reflect"
strings "strings"
)
// Reference imports to suppress errors if they are not otherwise used.
@ -26,37 +22,32 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Block struct {
Header Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"`
Data Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data"`
Evidence EvidenceData `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"`
LastCommit *Commit `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"`
}
func (m *Block) Reset() { *m = Block{} }
func (*Block) ProtoMessage() {}
Header Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"`
Data Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data"`
Evidence EvidenceData `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"`
LastCommit *Commit `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Block) Reset() { *m = Block{} }
func (m *Block) String() string { return proto.CompactTextString(m) }
func (*Block) ProtoMessage() {}
func (*Block) Descriptor() ([]byte, []int) {
return fileDescriptor_3aa007336dea920d, []int{0}
}
func (m *Block) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
return xxx_messageInfo_Block.Unmarshal(m, b)
}
func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Block.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
return xxx_messageInfo_Block.Marshal(b, m, deterministic)
}
func (m *Block) XXX_Merge(src proto.Message) {
xxx_messageInfo_Block.Merge(m, src)
}
func (m *Block) XXX_Size() int {
return m.Size()
return xxx_messageInfo_Block.Size(m)
}
func (m *Block) XXX_DiscardUnknown() {
xxx_messageInfo_Block.DiscardUnknown(m)
@ -99,7 +90,7 @@ func init() {
func init() { proto.RegisterFile("proto/types/block.proto", fileDescriptor_3aa007336dea920d) }
var fileDescriptor_3aa007336dea920d = []byte{
// 303 bytes of a gzipped FileDescriptorProto
// 248 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0x28, 0xca, 0x2f,
0xc9, 0xd7, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xca, 0xc9, 0x4f, 0xce, 0xd6, 0x03, 0x8b,
0x08, 0x89, 0x95, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, 0x40, 0x44, 0xf4, 0xc0,
@ -113,461 +104,7 @@ var fileDescriptor_3aa007336dea920d = []byte{
0x1b, 0x17, 0x07, 0xcc, 0x45, 0x12, 0xcc, 0x60, 0xbd, 0x2a, 0xb8, 0xf4, 0xba, 0x42, 0xd5, 0x21,
0x99, 0x01, 0xd7, 0x2b, 0x64, 0xcf, 0xc5, 0x9d, 0x93, 0x58, 0x5c, 0x12, 0x9f, 0x9c, 0x9f, 0x9b,
0x9b, 0x59, 0x22, 0xc1, 0x82, 0xdf, 0x0b, 0xce, 0x60, 0x55, 0x41, 0x5c, 0x20, 0x2d, 0x10, 0xb6,
0x53, 0xd2, 0x85, 0x87, 0x72, 0x0c, 0x37, 0x1e, 0xca, 0x31, 0x7c, 0x78, 0x28, 0xc7, 0xd8, 0xf0,
0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c,
0xf0, 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63,
0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x9d, 0xf4, 0xcc, 0x92, 0x8c, 0xd2,
0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x84, 0x5d, 0xc8, 0x4c, 0xa4, 0xb0, 0x4f, 0x62, 0x03, 0x73,
0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf3, 0x25, 0xe9, 0xab, 0x03, 0x02, 0x00, 0x00,
}
func (this *Block) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Block)
if !ok {
that2, ok := that.(Block)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if !this.Header.Equal(&that1.Header) {
return false
}
if !this.Data.Equal(&that1.Data) {
return false
}
if !this.Evidence.Equal(&that1.Evidence) {
return false
}
if !this.LastCommit.Equal(that1.LastCommit) {
return false
}
return true
}
func (this *Block) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 8)
s = append(s, "&types.Block{")
s = append(s, "Header: "+strings.Replace(this.Header.GoString(), `&`, ``, 1)+",\n")
s = append(s, "Data: "+strings.Replace(this.Data.GoString(), `&`, ``, 1)+",\n")
s = append(s, "Evidence: "+strings.Replace(this.Evidence.GoString(), `&`, ``, 1)+",\n")
if this.LastCommit != nil {
s = append(s, "LastCommit: "+fmt.Sprintf("%#v", this.LastCommit)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func valueToGoStringBlock(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func (m *Block) 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 *Block) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Block) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.LastCommit != nil {
{
size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintBlock(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
}
{
size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintBlock(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
{
size, err := m.Data.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintBlock(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
{
size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintBlock(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
0x93, 0x5e, 0x94, 0x4e, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x42,
0x1f, 0x32, 0x13, 0x29, 0x1c, 0x93, 0xd8, 0xc0, 0x1c, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff,
0x46, 0x9a, 0x1b, 0xf7, 0xcf, 0x01, 0x00, 0x00,
}
func encodeVarintBlock(dAtA []byte, offset int, v uint64) int {
offset -= sovBlock(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Block) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = m.Header.Size()
n += 1 + l + sovBlock(uint64(l))
l = m.Data.Size()
n += 1 + l + sovBlock(uint64(l))
l = m.Evidence.Size()
n += 1 + l + sovBlock(uint64(l))
if m.LastCommit != nil {
l = m.LastCommit.Size()
n += 1 + l + sovBlock(uint64(l))
}
return n
}
func sovBlock(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozBlock(x uint64) (n int) {
return sovBlock(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *Block) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Block{`,
`Header:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Header), "Header", "Header", 1), `&`, ``, 1) + `,`,
`Data:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Data), "Data", "Data", 1), `&`, ``, 1) + `,`,
`Evidence:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Evidence), "EvidenceData", "EvidenceData", 1), `&`, ``, 1) + `,`,
`LastCommit:` + strings.Replace(fmt.Sprintf("%v", this.LastCommit), "Commit", "Commit", 1) + `,`,
`}`,
}, "")
return s
}
func valueToStringBlock(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *Block) 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 ErrIntOverflowBlock
}
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: Block: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBlock
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBlock
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBlock
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.LastCommit == nil {
m.LastCommit = &Commit{}
}
if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBlock(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthBlock
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBlock
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipBlock(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, ErrIntOverflowBlock
}
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, ErrIntOverflowBlock
}
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, ErrIntOverflowBlock
}
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, ErrInvalidLengthBlock
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupBlock
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthBlock
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthBlock = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowBlock = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupBlock = fmt.Errorf("proto: unexpected end of group")
)

+ 71
- 1335
proto/types/evidence.pb.go
File diff suppressed because it is too large
View File


+ 92
- 1243
proto/types/params.pb.go
File diff suppressed because it is too large
View File


+ 342
- 3678
proto/types/types.pb.go
File diff suppressed because it is too large
View File


+ 49
- 759
proto/types/validator.pb.go View File

@ -4,16 +4,11 @@
package types
import (
bytes "bytes"
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
keys "github.com/tendermint/tendermint/proto/crypto/keys"
io "io"
math "math"
math_bits "math/bits"
reflect "reflect"
strings "strings"
)
// Reference imports to suppress errors if they are not otherwise used.
@ -28,36 +23,31 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type ValidatorSet struct {
Validators []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"`
Proposer *Validator `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"`
TotalVotingPower int64 `protobuf:"varint,3,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"`
Validators []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"`
Proposer *Validator `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"`
TotalVotingPower int64 `protobuf:"varint,3,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ValidatorSet) Reset() { *m = ValidatorSet{} }
func (*ValidatorSet) ProtoMessage() {}
func (m *ValidatorSet) Reset() { *m = ValidatorSet{} }
func (m *ValidatorSet) String() string { return proto.CompactTextString(m) }
func (*ValidatorSet) ProtoMessage() {}
func (*ValidatorSet) Descriptor() ([]byte, []int) {
return fileDescriptor_2e7c6b38c20e5406, []int{0}
}
func (m *ValidatorSet) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
return xxx_messageInfo_ValidatorSet.Unmarshal(m, b)
}
func (m *ValidatorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ValidatorSet.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
return xxx_messageInfo_ValidatorSet.Marshal(b, m, deterministic)
}
func (m *ValidatorSet) XXX_Merge(src proto.Message) {
xxx_messageInfo_ValidatorSet.Merge(m, src)
}
func (m *ValidatorSet) XXX_Size() int {
return m.Size()
return xxx_messageInfo_ValidatorSet.Size(m)
}
func (m *ValidatorSet) XXX_DiscardUnknown() {
xxx_messageInfo_ValidatorSet.DiscardUnknown(m)
@ -87,37 +77,32 @@ func (m *ValidatorSet) GetTotalVotingPower() int64 {
}
type Validator struct {
Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
PubKey keys.PublicKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
VotingPower int64 `protobuf:"varint,3,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"`
ProposerPriority int64 `protobuf:"varint,4,opt,name=proposer_priority,json=proposerPriority,proto3" json:"proposer_priority,omitempty"`
}
func (m *Validator) Reset() { *m = Validator{} }
func (*Validator) ProtoMessage() {}
Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
PubKey keys.PublicKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
VotingPower int64 `protobuf:"varint,3,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"`
ProposerPriority int64 `protobuf:"varint,4,opt,name=proposer_priority,json=proposerPriority,proto3" json:"proposer_priority,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Validator) Reset() { *m = Validator{} }
func (m *Validator) String() string { return proto.CompactTextString(m) }
func (*Validator) ProtoMessage() {}
func (*Validator) Descriptor() ([]byte, []int) {
return fileDescriptor_2e7c6b38c20e5406, []int{1}
}
func (m *Validator) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
return xxx_messageInfo_Validator.Unmarshal(m, b)
}
func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Validator.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
return xxx_messageInfo_Validator.Marshal(b, m, deterministic)
}
func (m *Validator) XXX_Merge(src proto.Message) {
xxx_messageInfo_Validator.Merge(m, src)
}
func (m *Validator) XXX_Size() int {
return m.Size()
return xxx_messageInfo_Validator.Size(m)
}
func (m *Validator) XXX_DiscardUnknown() {
xxx_messageInfo_Validator.DiscardUnknown(m)
@ -161,721 +146,26 @@ func init() {
func init() { proto.RegisterFile("proto/types/validator.proto", fileDescriptor_2e7c6b38c20e5406) }
var fileDescriptor_2e7c6b38c20e5406 = []byte{
// 383 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbd, 0x6e, 0xea, 0x30,
0x14, 0xc7, 0xe3, 0x0b, 0x82, 0x7b, 0x0d, 0xc3, 0xbd, 0x1e, 0xae, 0x22, 0xaa, 0xba, 0xc0, 0xd0,
0x22, 0x15, 0x25, 0x52, 0x3b, 0x77, 0x28, 0x43, 0x17, 0x16, 0x94, 0x4a, 0x0c, 0x5d, 0xa2, 0x84,
0x58, 0xc1, 0xe2, 0xc3, 0x96, 0xe3, 0x50, 0x79, 0xeb, 0x23, 0xf4, 0x31, 0xfa, 0x12, 0xed, 0xcc,
0xc8, 0xc8, 0x54, 0x95, 0xb0, 0x74, 0xe4, 0x11, 0x2a, 0x62, 0x12, 0x90, 0xca, 0xd0, 0xcd, 0xe7,
0xff, 0x3f, 0x1f, 0xbf, 0x73, 0x64, 0x78, 0xc2, 0x05, 0x93, 0xcc, 0x96, 0x8a, 0x93, 0xc8, 0x9e,
0x79, 0x63, 0x1a, 0x78, 0x92, 0x09, 0x2b, 0x55, 0xd1, 0x7f, 0x49, 0xa6, 0x01, 0x11, 0x13, 0x3a,
0x95, 0x5a, 0xb1, 0xd2, 0xbc, 0xda, 0xb9, 0x1c, 0x52, 0x11, 0xb8, 0xdc, 0x13, 0x52, 0xd9, 0xba,
0x41, 0xc8, 0x42, 0xb6, 0x7f, 0xe9, 0xec, 0xda, 0xa9, 0x56, 0x06, 0x42, 0x71, 0xc9, 0xec, 0x11,
0x51, 0x91, 0x1e, 0xa4, 0xed, 0xe6, 0x1b, 0x80, 0xd5, 0x7e, 0x36, 0xf2, 0x9e, 0x48, 0x74, 0x0b,
0x61, 0x8e, 0x10, 0x99, 0xa0, 0x5e, 0x68, 0x55, 0xae, 0x1a, 0xd6, 0x71, 0x08, 0x2b, 0xaf, 0x74,
0x0e, 0x8a, 0xd0, 0x0d, 0xfc, 0xcd, 0x05, 0xe3, 0x2c, 0x22, 0xc2, 0xfc, 0x55, 0x07, 0x3f, 0x6b,
0x90, 0x97, 0xa0, 0x36, 0x44, 0x92, 0x49, 0x6f, 0xec, 0xce, 0x98, 0xa4, 0xd3, 0xd0, 0xe5, 0xec,
0x91, 0x08, 0xb3, 0x50, 0x07, 0xad, 0x82, 0xf3, 0x37, 0x75, 0xfa, 0xa9, 0xd1, 0xdb, 0xea, 0xcd,
0x57, 0x00, 0xff, 0xe4, 0x5d, 0x90, 0x09, 0xcb, 0x5e, 0x10, 0x08, 0x12, 0x6d, 0xd1, 0x41, 0xab,
0xea, 0x64, 0x21, 0xba, 0x83, 0x65, 0x1e, 0xfb, 0xee, 0x88, 0xa8, 0x1d, 0xd3, 0xc5, 0x77, 0x26,
0x7d, 0x24, 0x6b, 0x7b, 0x24, 0xab, 0x17, 0xfb, 0x63, 0x3a, 0xe8, 0x12, 0xd5, 0x29, 0xce, 0xdf,
0xcf, 0x0c, 0xa7, 0xc4, 0x63, 0xbf, 0x4b, 0x14, 0x6a, 0xc0, 0xea, 0x11, 0xae, 0xca, 0x6c, 0x8f,
0x84, 0x2e, 0xe1, 0xbf, 0x6c, 0x19, 0x97, 0x0b, 0xca, 0x04, 0x95, 0xca, 0x2c, 0x6a, 0xfe, 0xcc,
0xe8, 0xed, 0xf4, 0x8e, 0xbf, 0x58, 0x61, 0x63, 0xb9, 0xc2, 0xc6, 0x66, 0x85, 0xc1, 0x53, 0x82,
0xc1, 0x4b, 0x82, 0xc1, 0x3c, 0xc1, 0x60, 0x91, 0x60, 0xf0, 0x91, 0x60, 0xf0, 0x99, 0x60, 0x63,
0x93, 0x60, 0xf0, 0xbc, 0xc6, 0xc6, 0x62, 0x8d, 0x8d, 0xe5, 0x1a, 0x1b, 0x0f, 0xed, 0x90, 0xca,
0x61, 0xec, 0x5b, 0x03, 0x36, 0xb1, 0xf7, 0x6b, 0x1c, 0x3e, 0x0f, 0xfe, 0x94, 0x5f, 0x4a, 0x83,
0xeb, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x2c, 0xc6, 0xff, 0x69, 0x02, 0x00, 0x00,
}
func (this *ValidatorSet) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*ValidatorSet)
if !ok {
that2, ok := that.(ValidatorSet)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if len(this.Validators) != len(that1.Validators) {
return false
}
for i := range this.Validators {
if !this.Validators[i].Equal(that1.Validators[i]) {
return false
}
}
if !this.Proposer.Equal(that1.Proposer) {
return false
}
if this.TotalVotingPower != that1.TotalVotingPower {
return false
}
return true
}
func (this *Validator) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Validator)
if !ok {
that2, ok := that.(Validator)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if !bytes.Equal(this.Address, that1.Address) {
return false
}
if !this.PubKey.Equal(&that1.PubKey) {
return false
}
if this.VotingPower != that1.VotingPower {
return false
}
if this.ProposerPriority != that1.ProposerPriority {
return false
}
return true
}
func (this *ValidatorSet) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 7)
s = append(s, "&types.ValidatorSet{")
if this.Validators != nil {
s = append(s, "Validators: "+fmt.Sprintf("%#v", this.Validators)+",\n")
}
if this.Proposer != nil {
s = append(s, "Proposer: "+fmt.Sprintf("%#v", this.Proposer)+",\n")
}
s = append(s, "TotalVotingPower: "+fmt.Sprintf("%#v", this.TotalVotingPower)+",\n")
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Validator) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 8)
s = append(s, "&types.Validator{")
s = append(s, "Address: "+fmt.Sprintf("%#v", this.Address)+",\n")
s = append(s, "PubKey: "+strings.Replace(this.PubKey.GoString(), `&`, ``, 1)+",\n")
s = append(s, "VotingPower: "+fmt.Sprintf("%#v", this.VotingPower)+",\n")
s = append(s, "ProposerPriority: "+fmt.Sprintf("%#v", this.ProposerPriority)+",\n")
s = append(s, "}")
return strings.Join(s, "")
}
func valueToGoStringValidator(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func (m *ValidatorSet) 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 *ValidatorSet) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ValidatorSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.TotalVotingPower != 0 {
i = encodeVarintValidator(dAtA, i, uint64(m.TotalVotingPower))
i--
dAtA[i] = 0x18
}
if m.Proposer != nil {
{
size, err := m.Proposer.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintValidator(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.Validators) > 0 {
for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintValidator(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *Validator) 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 *Validator) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
// 325 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbd, 0x4e, 0x02, 0x41,
0x10, 0xc7, 0x5d, 0x21, 0xa0, 0x0b, 0x85, 0x6e, 0x61, 0x2e, 0x18, 0x23, 0x50, 0x28, 0x89, 0x64,
0x2f, 0xd1, 0xda, 0x42, 0x0a, 0x1b, 0x1a, 0x72, 0x26, 0x14, 0x36, 0x97, 0x3b, 0x6e, 0x73, 0x6c,
0xf8, 0x98, 0xcd, 0xdc, 0x1c, 0x66, 0x1f, 0x4e, 0x6b, 0x9f, 0xc2, 0x67, 0x31, 0xdc, 0x72, 0x07,
0x89, 0x14, 0x76, 0x33, 0xff, 0xff, 0x7c, 0xfc, 0x76, 0xb2, 0xfc, 0xda, 0x20, 0x10, 0xf8, 0x64,
0x8d, 0xca, 0xfc, 0x4d, 0xb4, 0xd4, 0x49, 0x44, 0x80, 0xb2, 0x50, 0xc5, 0x15, 0xa9, 0x75, 0xa2,
0x70, 0xa5, 0xd7, 0xe4, 0x14, 0x59, 0xd4, 0x75, 0xee, 0x68, 0xae, 0x31, 0x09, 0x4d, 0x84, 0x64,
0x7d, 0x37, 0x20, 0x85, 0x14, 0xf6, 0x91, 0xab, 0xee, 0xdc, 0x38, 0x65, 0x86, 0xd6, 0x10, 0xf8,
0x0b, 0x65, 0x33, 0xb7, 0xc8, 0xd9, 0xfd, 0x2f, 0xc6, 0xdb, 0xd3, 0x72, 0xe5, 0x9b, 0x22, 0xf1,
0xc2, 0x79, 0x85, 0x90, 0x79, 0xac, 0x5b, 0x1b, 0xb4, 0x1e, 0x7b, 0xf2, 0x38, 0x84, 0xac, 0x3a,
0x83, 0x83, 0x26, 0xf1, 0xcc, 0xcf, 0x0c, 0x82, 0x81, 0x4c, 0xa1, 0x77, 0xda, 0x65, 0xff, 0x1b,
0x50, 0xb5, 0x88, 0x21, 0x17, 0x04, 0x14, 0x2d, 0xc3, 0x0d, 0x90, 0x5e, 0xa7, 0xa1, 0x81, 0x0f,
0x85, 0x5e, 0xad, 0xcb, 0x06, 0xb5, 0xe0, 0xa2, 0x70, 0xa6, 0x85, 0x31, 0xd9, 0xea, 0xfd, 0x4f,
0xc6, 0xcf, 0xab, 0x29, 0xc2, 0xe3, 0xcd, 0x28, 0x49, 0x50, 0x65, 0x5b, 0x74, 0x36, 0x68, 0x07,
0x65, 0x2a, 0x5e, 0x79, 0xd3, 0xe4, 0x71, 0xb8, 0x50, 0x76, 0xc7, 0x74, 0xff, 0x97, 0xc9, 0x1d,
0x49, 0x6e, 0x8f, 0x24, 0x27, 0x79, 0xbc, 0xd4, 0xb3, 0xb1, 0xb2, 0xa3, 0xfa, 0xf7, 0xcf, 0xed,
0x49, 0xd0, 0x30, 0x79, 0x3c, 0x56, 0x56, 0xf4, 0x78, 0xfb, 0x08, 0x57, 0x6b, 0xb3, 0x47, 0x12,
0x0f, 0xfc, 0xb2, 0x7c, 0x4c, 0x68, 0x50, 0x03, 0x6a, 0xb2, 0x5e, 0xdd, 0xf1, 0x97, 0xc6, 0x64,
0xa7, 0x8f, 0xe4, 0xfb, 0x30, 0xd5, 0x34, 0xcf, 0x63, 0x39, 0x83, 0x95, 0xbf, 0x47, 0x3a, 0x0c,
0x0f, 0xfe, 0x47, 0xdc, 0x28, 0x92, 0xa7, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x28, 0xeb,
0x40, 0x35, 0x02, 0x00, 0x00,
}
func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.ProposerPriority != 0 {
i = encodeVarintValidator(dAtA, i, uint64(m.ProposerPriority))
i--
dAtA[i] = 0x20
}
if m.VotingPower != 0 {
i = encodeVarintValidator(dAtA, i, uint64(m.VotingPower))
i--
dAtA[i] = 0x18
}
{
size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintValidator(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
if len(m.Address) > 0 {
i -= len(m.Address)
copy(dAtA[i:], m.Address)
i = encodeVarintValidator(dAtA, i, uint64(len(m.Address)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintValidator(dAtA []byte, offset int, v uint64) int {
offset -= sovValidator(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ValidatorSet) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Validators) > 0 {
for _, e := range m.Validators {
l = e.Size()
n += 1 + l + sovValidator(uint64(l))
}
}
if m.Proposer != nil {
l = m.Proposer.Size()
n += 1 + l + sovValidator(uint64(l))
}
if m.TotalVotingPower != 0 {
n += 1 + sovValidator(uint64(m.TotalVotingPower))
}
return n
}
func (m *Validator) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Address)
if l > 0 {
n += 1 + l + sovValidator(uint64(l))
}
l = m.PubKey.Size()
n += 1 + l + sovValidator(uint64(l))
if m.VotingPower != 0 {
n += 1 + sovValidator(uint64(m.VotingPower))
}
if m.ProposerPriority != 0 {
n += 1 + sovValidator(uint64(m.ProposerPriority))
}
return n
}
func sovValidator(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozValidator(x uint64) (n int) {
return sovValidator(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *ValidatorSet) String() string {
if this == nil {
return "nil"
}
repeatedStringForValidators := "[]*Validator{"
for _, f := range this.Validators {
repeatedStringForValidators += strings.Replace(f.String(), "Validator", "Validator", 1) + ","
}
repeatedStringForValidators += "}"
s := strings.Join([]string{`&ValidatorSet{`,
`Validators:` + repeatedStringForValidators + `,`,
`Proposer:` + strings.Replace(this.Proposer.String(), "Validator", "Validator", 1) + `,`,
`TotalVotingPower:` + fmt.Sprintf("%v", this.TotalVotingPower) + `,`,
`}`,
}, "")
return s
}
func (this *Validator) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Validator{`,
`Address:` + fmt.Sprintf("%v", this.Address) + `,`,
`PubKey:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PubKey), "PublicKey", "keys.PublicKey", 1), `&`, ``, 1) + `,`,
`VotingPower:` + fmt.Sprintf("%v", this.VotingPower) + `,`,
`ProposerPriority:` + fmt.Sprintf("%v", this.ProposerPriority) + `,`,
`}`,
}, "")
return s
}
func valueToStringValidator(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *ValidatorSet) 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 ErrIntOverflowValidator
}
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: ValidatorSet: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ValidatorSet: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowValidator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthValidator
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthValidator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Validators = append(m.Validators, &Validator{})
if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowValidator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthValidator
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthValidator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Proposer == nil {
m.Proposer = &Validator{}
}
if err := m.Proposer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType)
}
m.TotalVotingPower = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowValidator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.TotalVotingPower |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipValidator(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthValidator
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthValidator
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Validator) 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 ErrIntOverflowValidator
}
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: Validator: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowValidator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthValidator
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthValidator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
if m.Address == nil {
m.Address = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowValidator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthValidator
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthValidator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field VotingPower", wireType)
}
m.VotingPower = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowValidator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.VotingPower |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProposerPriority", wireType)
}
m.ProposerPriority = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowValidator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ProposerPriority |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipValidator(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthValidator
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthValidator
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipValidator(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, ErrIntOverflowValidator
}
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, ErrIntOverflowValidator
}
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, ErrIntOverflowValidator
}
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, ErrInvalidLengthValidator
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupValidator
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthValidator
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthValidator = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowValidator = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupValidator = fmt.Errorf("proto: unexpected end of group")
)

+ 31
- 526
proto/version/version.pb.go View File

@ -4,14 +4,11 @@
package version
import (
bytes "bytes"
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
io "io"
math "math"
math_bits "math/bits"
reflect "reflect"
strings "strings"
)
// Reference imports to suppress errors if they are not otherwise used.
@ -29,35 +26,30 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// This information is included in ResponseInfo. The App.Protocol can be
// updated in ResponseEndBlock.
type App struct {
Protocol uint64 `protobuf:"varint,1,opt,name=protocol,proto3" json:"protocol,omitempty"`
Software string `protobuf:"bytes,2,opt,name=software,proto3" json:"software,omitempty"`
Protocol uint64 `protobuf:"varint,1,opt,name=protocol,proto3" json:"protocol,omitempty"`
Software string `protobuf:"bytes,2,opt,name=software,proto3" json:"software,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *App) Reset() { *m = App{} }
func (*App) ProtoMessage() {}
func (m *App) Reset() { *m = App{} }
func (m *App) String() string { return proto.CompactTextString(m) }
func (*App) ProtoMessage() {}
func (*App) Descriptor() ([]byte, []int) {
return fileDescriptor_14aa2353622f11e1, []int{0}
}
func (m *App) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
return xxx_messageInfo_App.Unmarshal(m, b)
}
func (m *App) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_App.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
return xxx_messageInfo_App.Marshal(b, m, deterministic)
}
func (m *App) XXX_Merge(src proto.Message) {
xxx_messageInfo_App.Merge(m, src)
}
func (m *App) XXX_Size() int {
return m.Size()
return xxx_messageInfo_App.Size(m)
}
func (m *App) XXX_DiscardUnknown() {
xxx_messageInfo_App.DiscardUnknown(m)
@ -83,35 +75,30 @@ func (m *App) GetSoftware() string {
// including all blockchain data structures and the rules of the application's
// state transition machine.
type Consensus struct {
Block uint64 `protobuf:"varint,1,opt,name=block,proto3" json:"block,omitempty"`
App uint64 `protobuf:"varint,2,opt,name=app,proto3" json:"app,omitempty"`
Block uint64 `protobuf:"varint,1,opt,name=block,proto3" json:"block,omitempty"`
App uint64 `protobuf:"varint,2,opt,name=app,proto3" json:"app,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Consensus) Reset() { *m = Consensus{} }
func (*Consensus) ProtoMessage() {}
func (m *Consensus) Reset() { *m = Consensus{} }
func (m *Consensus) String() string { return proto.CompactTextString(m) }
func (*Consensus) ProtoMessage() {}
func (*Consensus) Descriptor() ([]byte, []int) {
return fileDescriptor_14aa2353622f11e1, []int{1}
}
func (m *Consensus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
return xxx_messageInfo_Consensus.Unmarshal(m, b)
}
func (m *Consensus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Consensus.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
return xxx_messageInfo_Consensus.Marshal(b, m, deterministic)
}
func (m *Consensus) XXX_Merge(src proto.Message) {
xxx_messageInfo_Consensus.Merge(m, src)
}
func (m *Consensus) XXX_Size() int {
return m.Size()
return xxx_messageInfo_Consensus.Size(m)
}
func (m *Consensus) XXX_DiscardUnknown() {
xxx_messageInfo_Consensus.DiscardUnknown(m)
@ -141,7 +128,7 @@ func init() {
func init() { proto.RegisterFile("proto/version/version.proto", fileDescriptor_14aa2353622f11e1) }
var fileDescriptor_14aa2353622f11e1 = []byte{
// 258 bytes of a gzipped FileDescriptorProto
// 203 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x28, 0xca, 0x2f,
0xc9, 0xd7, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x83, 0xd1, 0x7a, 0x60, 0x51, 0x21, 0x89,
0x92, 0xd4, 0xbc, 0x94, 0xd4, 0xa2, 0xdc, 0xcc, 0xbc, 0x12, 0x88, 0x88, 0x1e, 0x54, 0x5e, 0x4a,
@ -152,42 +139,11 @@ var fileDescriptor_14aa2353622f11e1 = []byte{
0x38, 0x5f, 0xc9, 0x96, 0x8b, 0xd3, 0x39, 0x3f, 0xaf, 0x38, 0x35, 0xaf, 0xb8, 0xb4, 0x58, 0x48,
0x84, 0x8b, 0x35, 0x29, 0x27, 0x3f, 0x39, 0x1b, 0x6a, 0x02, 0x84, 0x23, 0x24, 0xc0, 0xc5, 0x9c,
0x58, 0x50, 0x00, 0xd6, 0xc9, 0x12, 0x04, 0x62, 0x5a, 0x71, 0xec, 0x58, 0x20, 0xcf, 0xf8, 0x62,
0x81, 0x3c, 0xa3, 0x53, 0xca, 0x85, 0x87, 0x72, 0x0c, 0x37, 0x1e, 0xca, 0x31, 0x7c, 0x78, 0x28,
0xc7, 0xd8, 0xf0, 0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c,
0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x8f, 0xe4, 0x18, 0x27,
0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xbd, 0xf4, 0xcc,
0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x44, 0x00, 0x20, 0x33, 0x51, 0xc2, 0x2c,
0x89, 0x0d, 0xcc, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x00, 0x5b, 0x7f, 0x4b, 0x01,
0x00, 0x00,
0x81, 0x3c, 0xa3, 0x93, 0x41, 0x94, 0x5e, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e,
0xae, 0x3e, 0xc2, 0x33, 0xc8, 0x4c, 0x14, 0xff, 0x27, 0xb1, 0x81, 0xb9, 0xc6, 0x80, 0x00, 0x00,
0x00, 0xff, 0xff, 0x20, 0x9f, 0x49, 0xf1, 0x17, 0x01, 0x00, 0x00,
}
func (this *App) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*App)
if !ok {
that2, ok := that.(App)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Protocol != that1.Protocol {
return false
}
if this.Software != that1.Software {
return false
}
return true
}
func (this *Consensus) Equal(that interface{}) bool {
if that == nil {
return this == nil
@ -213,122 +169,17 @@ func (this *Consensus) Equal(that interface{}) bool {
if this.App != that1.App {
return false
}
return true
}
func (this *App) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 6)
s = append(s, "&version.App{")
s = append(s, "Protocol: "+fmt.Sprintf("%#v", this.Protocol)+",\n")
s = append(s, "Software: "+fmt.Sprintf("%#v", this.Software)+",\n")
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Consensus) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 6)
s = append(s, "&version.Consensus{")
s = append(s, "Block: "+fmt.Sprintf("%#v", this.Block)+",\n")
s = append(s, "App: "+fmt.Sprintf("%#v", this.App)+",\n")
s = append(s, "}")
return strings.Join(s, "")
}
func valueToGoStringVersion(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func (m *App) 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 *App) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *App) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Software) > 0 {
i -= len(m.Software)
copy(dAtA[i:], m.Software)
i = encodeVarintVersion(dAtA, i, uint64(len(m.Software)))
i--
dAtA[i] = 0x12
}
if m.Protocol != 0 {
i = encodeVarintVersion(dAtA, i, uint64(m.Protocol))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *Consensus) 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 *Consensus) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Consensus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.App != 0 {
i = encodeVarintVersion(dAtA, i, uint64(m.App))
i--
dAtA[i] = 0x10
}
if m.Block != 0 {
i = encodeVarintVersion(dAtA, i, uint64(m.Block))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintVersion(dAtA []byte, offset int, v uint64) int {
offset -= sovVersion(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
dAtA[offset] = uint8(v)
return base
return true
}
func NewPopulatedConsensus(r randyVersion, easy bool) *Consensus {
this := &Consensus{}
this.Block = uint64(uint64(r.Uint32()))
this.App = uint64(uint64(r.Uint32()))
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedVersion(r, 3)
}
return this
}
@ -405,349 +256,3 @@ func encodeVarintPopulateVersion(dAtA []byte, v uint64) []byte {
dAtA = append(dAtA, uint8(v))
return dAtA
}
func (m *App) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Protocol != 0 {
n += 1 + sovVersion(uint64(m.Protocol))
}
l = len(m.Software)
if l > 0 {
n += 1 + l + sovVersion(uint64(l))
}
return n
}
func (m *Consensus) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Block != 0 {
n += 1 + sovVersion(uint64(m.Block))
}
if m.App != 0 {
n += 1 + sovVersion(uint64(m.App))
}
return n
}
func sovVersion(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozVersion(x uint64) (n int) {
return sovVersion(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *App) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&App{`,
`Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`,
`Software:` + fmt.Sprintf("%v", this.Software) + `,`,
`}`,
}, "")
return s
}
func (this *Consensus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Consensus{`,
`Block:` + fmt.Sprintf("%v", this.Block) + `,`,
`App:` + fmt.Sprintf("%v", this.App) + `,`,
`}`,
}, "")
return s
}
func valueToStringVersion(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *App) 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 ErrIntOverflowVersion
}
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: App: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: App: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
}
m.Protocol = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVersion
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Protocol |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Software", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVersion
}
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 ErrInvalidLengthVersion
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthVersion
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Software = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipVersion(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthVersion
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthVersion
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Consensus) 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 ErrIntOverflowVersion
}
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: Consensus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Consensus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
}
m.Block = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVersion
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Block |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field App", wireType)
}
m.App = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVersion
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.App |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipVersion(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthVersion
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthVersion
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipVersion(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, ErrIntOverflowVersion
}
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, ErrIntOverflowVersion
}
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, ErrIntOverflowVersion
}
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, ErrInvalidLengthVersion
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupVersion
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthVersion
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthVersion = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowVersion = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupVersion = fmt.Errorf("proto: unexpected end of group")
)

Loading…
Cancel
Save