diff --git a/proto/crypto/keys/types.pb.go b/proto/crypto/keys/types.pb.go index d8b99816d..38a46f1ff 100644 --- a/proto/crypto/keys/types.pb.go +++ b/proto/crypto/keys/types.pb.go @@ -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") -) diff --git a/proto/evidence/msgs.pb.go b/proto/evidence/msgs.pb.go index be3ec2fa6..99b8a6175 100644 --- a/proto/evidence/msgs.pb.go +++ b/proto/evidence/msgs.pb.go @@ -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") -) diff --git a/proto/libs/bits/types.pb.go b/proto/libs/bits/types.pb.go index 6c4636dca..05cfefa4c 100644 --- a/proto/libs/bits/types.pb.go +++ b/proto/libs/bits/types.pb.go @@ -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") -) diff --git a/proto/state/types.pb.go b/proto/state/types.pb.go index b69264cdd..82472a355 100644 --- a/proto/state/types.pb.go +++ b/proto/state/types.pb.go @@ -4,20 +4,14 @@ package state import ( - bytes "bytes" fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "github.com/golang/protobuf/ptypes/timestamp" types "github.com/tendermint/tendermint/abci/types" types1 "github.com/tendermint/tendermint/proto/types" version "github.com/tendermint/tendermint/proto/version" - io "io" math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" time "time" ) @@ -37,36 +31,31 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // of the various ABCI calls during block processing. // It is persisted to disk for each height before calling Commit. type ABCIResponses struct { - DeliverTxs []*types.ResponseDeliverTx `protobuf:"bytes,1,rep,name=deliver_txs,json=deliverTxs,proto3" json:"deliver_txs,omitempty"` - EndBlock *types.ResponseEndBlock `protobuf:"bytes,2,opt,name=end_block,json=endBlock,proto3" json:"end_block,omitempty"` - BeginBlock *types.ResponseBeginBlock `protobuf:"bytes,3,opt,name=begin_block,json=beginBlock,proto3" json:"begin_block,omitempty"` + DeliverTxs []*types.ResponseDeliverTx `protobuf:"bytes,1,rep,name=deliver_txs,json=deliverTxs,proto3" json:"deliver_txs,omitempty"` + EndBlock *types.ResponseEndBlock `protobuf:"bytes,2,opt,name=end_block,json=endBlock,proto3" json:"end_block,omitempty"` + BeginBlock *types.ResponseBeginBlock `protobuf:"bytes,3,opt,name=begin_block,json=beginBlock,proto3" json:"begin_block,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ABCIResponses) Reset() { *m = ABCIResponses{} } -func (*ABCIResponses) ProtoMessage() {} +func (m *ABCIResponses) Reset() { *m = ABCIResponses{} } +func (m *ABCIResponses) String() string { return proto.CompactTextString(m) } +func (*ABCIResponses) ProtoMessage() {} func (*ABCIResponses) Descriptor() ([]byte, []int) { return fileDescriptor_00e69fef8162ea9b, []int{0} } func (m *ABCIResponses) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ABCIResponses.Unmarshal(m, b) } func (m *ABCIResponses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ABCIResponses.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_ABCIResponses.Marshal(b, m, deterministic) } func (m *ABCIResponses) XXX_Merge(src proto.Message) { xxx_messageInfo_ABCIResponses.Merge(m, src) } func (m *ABCIResponses) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ABCIResponses.Size(m) } func (m *ABCIResponses) XXX_DiscardUnknown() { xxx_messageInfo_ABCIResponses.DiscardUnknown(m) @@ -97,35 +86,30 @@ func (m *ABCIResponses) GetBeginBlock() *types.ResponseBeginBlock { // ValidatorsInfo represents the latest validator set, or the last height it changed type ValidatorsInfo struct { - ValidatorSet *types1.ValidatorSet `protobuf:"bytes,1,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty"` - LastHeightChanged int64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"` + ValidatorSet *types1.ValidatorSet `protobuf:"bytes,1,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty"` + LastHeightChanged int64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ValidatorsInfo) Reset() { *m = ValidatorsInfo{} } -func (*ValidatorsInfo) ProtoMessage() {} +func (m *ValidatorsInfo) Reset() { *m = ValidatorsInfo{} } +func (m *ValidatorsInfo) String() string { return proto.CompactTextString(m) } +func (*ValidatorsInfo) ProtoMessage() {} func (*ValidatorsInfo) Descriptor() ([]byte, []int) { return fileDescriptor_00e69fef8162ea9b, []int{1} } func (m *ValidatorsInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ValidatorsInfo.Unmarshal(m, b) } func (m *ValidatorsInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorsInfo.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_ValidatorsInfo.Marshal(b, m, deterministic) } func (m *ValidatorsInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatorsInfo.Merge(m, src) } func (m *ValidatorsInfo) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ValidatorsInfo.Size(m) } func (m *ValidatorsInfo) XXX_DiscardUnknown() { xxx_messageInfo_ValidatorsInfo.DiscardUnknown(m) @@ -149,35 +133,30 @@ func (m *ValidatorsInfo) GetLastHeightChanged() int64 { // ConsensusParamsInfo represents the latest consensus params, or the last height it changed type ConsensusParamsInfo struct { - ConsensusParams types1.ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"` - LastHeightChanged int64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"` + ConsensusParams types1.ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"` + LastHeightChanged int64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ConsensusParamsInfo) Reset() { *m = ConsensusParamsInfo{} } -func (*ConsensusParamsInfo) ProtoMessage() {} +func (m *ConsensusParamsInfo) Reset() { *m = ConsensusParamsInfo{} } +func (m *ConsensusParamsInfo) String() string { return proto.CompactTextString(m) } +func (*ConsensusParamsInfo) ProtoMessage() {} func (*ConsensusParamsInfo) Descriptor() ([]byte, []int) { return fileDescriptor_00e69fef8162ea9b, []int{2} } func (m *ConsensusParamsInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ConsensusParamsInfo.Unmarshal(m, b) } func (m *ConsensusParamsInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusParamsInfo.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_ConsensusParamsInfo.Marshal(b, m, deterministic) } func (m *ConsensusParamsInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_ConsensusParamsInfo.Merge(m, src) } func (m *ConsensusParamsInfo) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ConsensusParamsInfo.Size(m) } func (m *ConsensusParamsInfo) XXX_DiscardUnknown() { xxx_messageInfo_ConsensusParamsInfo.DiscardUnknown(m) @@ -200,35 +179,30 @@ func (m *ConsensusParamsInfo) GetLastHeightChanged() int64 { } type Version struct { - Consensus version.Consensus `protobuf:"bytes,1,opt,name=consensus,proto3" json:"consensus"` - Software string `protobuf:"bytes,2,opt,name=software,proto3" json:"software,omitempty"` + Consensus version.Consensus `protobuf:"bytes,1,opt,name=consensus,proto3" json:"consensus"` + 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 *Version) Reset() { *m = Version{} } -func (*Version) ProtoMessage() {} +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor_00e69fef8162ea9b, []int{3} } func (m *Version) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Version.Unmarshal(m, b) } func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Version.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_Version.Marshal(b, m, deterministic) } func (m *Version) XXX_Merge(src proto.Message) { xxx_messageInfo_Version.Merge(m, src) } func (m *Version) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Version.Size(m) } func (m *Version) XXX_DiscardUnknown() { xxx_messageInfo_Version.DiscardUnknown(m) @@ -275,34 +249,29 @@ type State struct { // Merkle root of the results from executing prev block LastResultsHash []byte `protobuf:"bytes,12,opt,name=LastResultsHash,proto3" json:"LastResultsHash,omitempty"` // the latest AppHash we've received from calling abci.Commit() - AppHash []byte `protobuf:"bytes,13,opt,name=AppHash,proto3" json:"AppHash,omitempty"` + AppHash []byte `protobuf:"bytes,13,opt,name=AppHash,proto3" json:"AppHash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *State) Reset() { *m = State{} } -func (*State) ProtoMessage() {} +func (m *State) Reset() { *m = State{} } +func (m *State) String() string { return proto.CompactTextString(m) } +func (*State) ProtoMessage() {} func (*State) Descriptor() ([]byte, []int) { return fileDescriptor_00e69fef8162ea9b, []int{4} } func (m *State) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_State.Unmarshal(m, b) } func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_State.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_State.Marshal(b, m, deterministic) } func (m *State) XXX_Merge(src proto.Message) { xxx_messageInfo_State.Merge(m, src) } func (m *State) XXX_Size() int { - return m.Size() + return xxx_messageInfo_State.Size(m) } func (m *State) XXX_DiscardUnknown() { xxx_messageInfo_State.DiscardUnknown(m) @@ -412,1871 +381,51 @@ func init() { func init() { proto.RegisterFile("proto/state/types.proto", fileDescriptor_00e69fef8162ea9b) } var fileDescriptor_00e69fef8162ea9b = []byte{ - // 782 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x41, 0x4f, 0xdb, 0x48, - 0x14, 0x8e, 0x37, 0x40, 0x92, 0x31, 0x21, 0xbb, 0x83, 0xc4, 0x5a, 0x41, 0x72, 0xa2, 0x2c, 0x82, - 0xec, 0x6a, 0xe5, 0x48, 0xf4, 0x07, 0x54, 0x38, 0xa9, 0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 0xff, 0xff, 0x34, 0xe7, 0x79, 0x01, 0x58, 0x07, 0x00, 0x00, -} - -func (this *ABCIResponses) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ABCIResponses) - if !ok { - that2, ok := that.(ABCIResponses) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.DeliverTxs) != len(that1.DeliverTxs) { - return false - } - for i := range this.DeliverTxs { - if !this.DeliverTxs[i].Equal(that1.DeliverTxs[i]) { - return false - } - } - if !this.EndBlock.Equal(that1.EndBlock) { - return false - } - if !this.BeginBlock.Equal(that1.BeginBlock) { - return false - } - return true -} -func (this *ValidatorsInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ValidatorsInfo) - if !ok { - that2, ok := that.(ValidatorsInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ValidatorSet.Equal(that1.ValidatorSet) { - return false - } - if this.LastHeightChanged != that1.LastHeightChanged { - return false - } - return true -} -func (this *ConsensusParamsInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ConsensusParamsInfo) - if !ok { - that2, ok := that.(ConsensusParamsInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ConsensusParams.Equal(&that1.ConsensusParams) { - return false - } - if this.LastHeightChanged != that1.LastHeightChanged { - return false - } - return true -} -func (this *Version) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Version) - if !ok { - that2, ok := that.(Version) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Consensus.Equal(&that1.Consensus) { - return false - } - if this.Software != that1.Software { - return false - } - return true -} -func (this *State) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*State) - if !ok { - that2, ok := that.(State) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Version.Equal(&that1.Version) { - return false - } - if this.ChainID != that1.ChainID { - return false - } - if this.LastBlockHeight != that1.LastBlockHeight { - return false - } - if !this.LastBlockID.Equal(&that1.LastBlockID) { - return false - } - if !this.LastBlockTime.Equal(that1.LastBlockTime) { - return false - } - if !this.NextValidators.Equal(that1.NextValidators) { - return false - } - if !this.Validators.Equal(that1.Validators) { - return false - } - if !this.LastValidators.Equal(that1.LastValidators) { - return false - } - if this.LastHeightValidatorsChanged != that1.LastHeightValidatorsChanged { - return false - } - if !this.ConsensusParams.Equal(&that1.ConsensusParams) { - return false - } - if this.LastHeightConsensusParamsChanged != that1.LastHeightConsensusParamsChanged { - return false - } - if !bytes.Equal(this.LastResultsHash, that1.LastResultsHash) { - return false - } - if !bytes.Equal(this.AppHash, that1.AppHash) { - return false - } - return true -} -func (this *ABCIResponses) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&state.ABCIResponses{") - if this.DeliverTxs != nil { - s = append(s, "DeliverTxs: "+fmt.Sprintf("%#v", this.DeliverTxs)+",\n") - } - if this.EndBlock != nil { - s = append(s, "EndBlock: "+fmt.Sprintf("%#v", this.EndBlock)+",\n") - } - if this.BeginBlock != nil { - s = append(s, "BeginBlock: "+fmt.Sprintf("%#v", this.BeginBlock)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ValidatorsInfo) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&state.ValidatorsInfo{") - if this.ValidatorSet != nil { - s = append(s, "ValidatorSet: "+fmt.Sprintf("%#v", this.ValidatorSet)+",\n") - } - s = append(s, "LastHeightChanged: "+fmt.Sprintf("%#v", this.LastHeightChanged)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ConsensusParamsInfo) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&state.ConsensusParamsInfo{") - s = append(s, "ConsensusParams: "+strings.Replace(this.ConsensusParams.GoString(), `&`, ``, 1)+",\n") - s = append(s, "LastHeightChanged: "+fmt.Sprintf("%#v", this.LastHeightChanged)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Version) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&state.Version{") - s = append(s, "Consensus: "+strings.Replace(this.Consensus.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Software: "+fmt.Sprintf("%#v", this.Software)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *State) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 17) - s = append(s, "&state.State{") - s = append(s, "Version: "+strings.Replace(this.Version.GoString(), `&`, ``, 1)+",\n") - s = append(s, "ChainID: "+fmt.Sprintf("%#v", this.ChainID)+",\n") - s = append(s, "LastBlockHeight: "+fmt.Sprintf("%#v", this.LastBlockHeight)+",\n") - s = append(s, "LastBlockID: "+strings.Replace(this.LastBlockID.GoString(), `&`, ``, 1)+",\n") - s = append(s, "LastBlockTime: "+fmt.Sprintf("%#v", this.LastBlockTime)+",\n") - if this.NextValidators != nil { - s = append(s, "NextValidators: "+fmt.Sprintf("%#v", this.NextValidators)+",\n") - } - if this.Validators != nil { - s = append(s, "Validators: "+fmt.Sprintf("%#v", this.Validators)+",\n") - } - if this.LastValidators != nil { - s = append(s, "LastValidators: "+fmt.Sprintf("%#v", this.LastValidators)+",\n") - } - s = append(s, "LastHeightValidatorsChanged: "+fmt.Sprintf("%#v", this.LastHeightValidatorsChanged)+",\n") - s = append(s, "ConsensusParams: "+strings.Replace(this.ConsensusParams.GoString(), `&`, ``, 1)+",\n") - s = append(s, "LastHeightConsensusParamsChanged: "+fmt.Sprintf("%#v", this.LastHeightConsensusParamsChanged)+",\n") - s = append(s, "LastResultsHash: "+fmt.Sprintf("%#v", this.LastResultsHash)+",\n") - s = append(s, "AppHash: "+fmt.Sprintf("%#v", this.AppHash)+",\n") - s = append(s, "}") - return strings.Join(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 *ABCIResponses) 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 *ABCIResponses) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ABCIResponses) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BeginBlock != nil { - { - size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.EndBlock != nil { - { - size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.DeliverTxs) > 0 { - for iNdEx := len(m.DeliverTxs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DeliverTxs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ValidatorsInfo) 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 *ValidatorsInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorsInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LastHeightChanged != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightChanged)) - i-- - dAtA[i] = 0x10 - } - if m.ValidatorSet != nil { - { - size, err := m.ValidatorSet.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + // 722 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x5d, 0x6a, 0xdb, 0x40, + 0x10, 0xae, 0xea, 0x24, 0xb6, 0x47, 0x71, 0xdc, 0x6e, 0x20, 0x15, 0x0e, 0xd4, 0xc6, 0x0d, 0x89, + 0x5b, 0x8a, 0x0c, 0xe9, 0x01, 0x4a, 0x64, 0x97, 0x46, 0x25, 0x2d, 0x45, 0x09, 0x21, 0xf4, 0x45, + 0xc8, 0xd6, 0x46, 0x12, 0xb5, 0x25, 0xa1, 0x5d, 0xbb, 0xc9, 0x19, 0xfa, 0xd2, 0x1b, 0xf4, 0x3a, + 0xbd, 0x43, 0x21, 0x85, 0x3c, 0xf7, 0x10, 0x65, 0x7f, 0x24, 0x6d, 0x9c, 0x84, 0x60, 0xe8, 0x93, + 0x57, 0x33, 0xf3, 0x7d, 0xf3, 0xcd, 0xee, 0x37, 0x18, 0x9e, 0xa5, 0x59, 0x42, 0x93, 0x3e, 0xa1, + 0x1e, 0xc5, 0x7d, 0x7a, 0x99, 0x62, 0x62, 0xf2, 0x08, 0xda, 0xa2, 0x38, 0xf6, 0x71, 0x36, 0x8d, + 0x62, 0x2a, 0x22, 0x26, 0xaf, 0x69, 0xed, 0xd2, 0x30, 0xca, 0x7c, 0x37, 0xf5, 0x32, 0x7a, 0xd9, + 0x17, 0xe0,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 0x4d, 0x79, 0x45, 0x83, 0x57, 0xe4, 0x9f, 0x96, 0xf9, 0xe5, + 0x75, 0x10, 0xd1, 0x70, 0x36, 0x32, 0xc7, 0xc9, 0xb4, 0x5f, 0xce, 0xa7, 0x1e, 0x95, 0xbf, 0xc3, + 0xd1, 0x1a, 0xff, 0x78, 0xf3, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x78, 0x53, 0xd2, 0x08, 0x24, 0x07, + 0x00, 0x00, } - -func (m *ConsensusParamsInfo) 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 *ConsensusParamsInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusParamsInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LastHeightChanged != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightChanged)) - i-- - dAtA[i] = 0x10 - } - { - size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Version) 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 *Version) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Version) 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 = encodeVarintTypes(dAtA, i, uint64(len(m.Software))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Consensus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *State) 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 *State) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AppHash) > 0 { - i -= len(m.AppHash) - copy(dAtA[i:], m.AppHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) - i-- - dAtA[i] = 0x6a - } - if len(m.LastResultsHash) > 0 { - i -= len(m.LastResultsHash) - copy(dAtA[i:], m.LastResultsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) - i-- - dAtA[i] = 0x62 - } - if m.LastHeightConsensusParamsChanged != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightConsensusParamsChanged)) - i-- - dAtA[i] = 0x58 - } - { - size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - if m.LastHeightValidatorsChanged != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightValidatorsChanged)) - i-- - dAtA[i] = 0x48 - } - if m.LastValidators != nil { - { - size, err := m.LastValidators.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.Validators != nil { - { - size, err := m.Validators.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.NextValidators != nil { - { - size, err := m.NextValidators.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):]) - if err10 != nil { - return 0, err10 - } - i -= n10 - i = encodeVarintTypes(dAtA, i, uint64(n10)) - i-- - dAtA[i] = 0x2a - { - size, err := m.LastBlockID.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.LastBlockHeight != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight)) - i-- - dAtA[i] = 0x18 - } - if len(m.ChainID) > 0 { - i -= len(m.ChainID) - copy(dAtA[i:], m.ChainID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - 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 (m *ABCIResponses) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DeliverTxs) > 0 { - for _, e := range m.DeliverTxs { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if m.EndBlock != nil { - l = m.EndBlock.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.BeginBlock != nil { - l = m.BeginBlock.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ValidatorsInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorSet != nil { - l = m.ValidatorSet.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.LastHeightChanged != 0 { - n += 1 + sovTypes(uint64(m.LastHeightChanged)) - } - return n -} - -func (m *ConsensusParamsInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ConsensusParams.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.LastHeightChanged != 0 { - n += 1 + sovTypes(uint64(m.LastHeightChanged)) - } - return n -} - -func (m *Version) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Consensus.Size() - n += 1 + l + sovTypes(uint64(l)) - l = len(m.Software) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *State) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Version.Size() - n += 1 + l + sovTypes(uint64(l)) - l = len(m.ChainID) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.LastBlockHeight != 0 { - n += 1 + sovTypes(uint64(m.LastBlockHeight)) - } - l = m.LastBlockID.Size() - n += 1 + l + sovTypes(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime) - n += 1 + l + sovTypes(uint64(l)) - if m.NextValidators != nil { - l = m.NextValidators.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Validators != nil { - l = m.Validators.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.LastValidators != nil { - l = m.LastValidators.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.LastHeightValidatorsChanged != 0 { - n += 1 + sovTypes(uint64(m.LastHeightValidatorsChanged)) - } - l = m.ConsensusParams.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.LastHeightConsensusParamsChanged != 0 { - n += 1 + sovTypes(uint64(m.LastHeightConsensusParamsChanged)) - } - l = len(m.LastResultsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.AppHash) - if l > 0 { - 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 *ABCIResponses) String() string { - if this == nil { - return "nil" - } - repeatedStringForDeliverTxs := "[]*ResponseDeliverTx{" - for _, f := range this.DeliverTxs { - repeatedStringForDeliverTxs += strings.Replace(fmt.Sprintf("%v", f), "ResponseDeliverTx", "types.ResponseDeliverTx", 1) + "," - } - repeatedStringForDeliverTxs += "}" - s := strings.Join([]string{`&ABCIResponses{`, - `DeliverTxs:` + repeatedStringForDeliverTxs + `,`, - `EndBlock:` + strings.Replace(fmt.Sprintf("%v", this.EndBlock), "ResponseEndBlock", "types.ResponseEndBlock", 1) + `,`, - `BeginBlock:` + strings.Replace(fmt.Sprintf("%v", this.BeginBlock), "ResponseBeginBlock", "types.ResponseBeginBlock", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ValidatorsInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ValidatorsInfo{`, - `ValidatorSet:` + strings.Replace(fmt.Sprintf("%v", this.ValidatorSet), "ValidatorSet", "types1.ValidatorSet", 1) + `,`, - `LastHeightChanged:` + fmt.Sprintf("%v", this.LastHeightChanged) + `,`, - `}`, - }, "") - return s -} -func (this *ConsensusParamsInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ConsensusParamsInfo{`, - `ConsensusParams:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConsensusParams), "ConsensusParams", "types1.ConsensusParams", 1), `&`, ``, 1) + `,`, - `LastHeightChanged:` + fmt.Sprintf("%v", this.LastHeightChanged) + `,`, - `}`, - }, "") - return s -} -func (this *Version) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Version{`, - `Consensus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Consensus), "Consensus", "version.Consensus", 1), `&`, ``, 1) + `,`, - `Software:` + fmt.Sprintf("%v", this.Software) + `,`, - `}`, - }, "") - return s -} -func (this *State) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&State{`, - `Version:` + strings.Replace(strings.Replace(this.Version.String(), "Version", "Version", 1), `&`, ``, 1) + `,`, - `ChainID:` + fmt.Sprintf("%v", this.ChainID) + `,`, - `LastBlockHeight:` + fmt.Sprintf("%v", this.LastBlockHeight) + `,`, - `LastBlockID:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastBlockID), "BlockID", "types1.BlockID", 1), `&`, ``, 1) + `,`, - `LastBlockTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastBlockTime), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`, - `NextValidators:` + strings.Replace(fmt.Sprintf("%v", this.NextValidators), "ValidatorSet", "types1.ValidatorSet", 1) + `,`, - `Validators:` + strings.Replace(fmt.Sprintf("%v", this.Validators), "ValidatorSet", "types1.ValidatorSet", 1) + `,`, - `LastValidators:` + strings.Replace(fmt.Sprintf("%v", this.LastValidators), "ValidatorSet", "types1.ValidatorSet", 1) + `,`, - `LastHeightValidatorsChanged:` + fmt.Sprintf("%v", this.LastHeightValidatorsChanged) + `,`, - `ConsensusParams:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConsensusParams), "ConsensusParams", "types1.ConsensusParams", 1), `&`, ``, 1) + `,`, - `LastHeightConsensusParamsChanged:` + fmt.Sprintf("%v", this.LastHeightConsensusParamsChanged) + `,`, - `LastResultsHash:` + fmt.Sprintf("%v", this.LastResultsHash) + `,`, - `AppHash:` + fmt.Sprintf("%v", this.AppHash) + `,`, - `}`, - }, "") - 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 *ABCIResponses) 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: ABCIResponses: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ABCIResponses: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeliverTxs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeliverTxs = append(m.DeliverTxs, &types.ResponseDeliverTx{}) - if err := m.DeliverTxs[len(m.DeliverTxs)-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 EndBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EndBlock == nil { - m.EndBlock = &types.ResponseEndBlock{} - } - if err := m.EndBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BeginBlock == nil { - m.BeginBlock = &types.ResponseBeginBlock{} - } - if err := m.BeginBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *ValidatorsInfo) 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: ValidatorsInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorsInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorSet == nil { - m.ValidatorSet = &types1.ValidatorSet{} - } - if err := m.ValidatorSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastHeightChanged", wireType) - } - m.LastHeightChanged = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastHeightChanged |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 *ConsensusParamsInfo) 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: ConsensusParamsInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusParamsInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastHeightChanged", wireType) - } - m.LastHeightChanged = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastHeightChanged |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 *Version) 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: Version: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Version: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Consensus", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Consensus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Software = string(dAtA[iNdEx:postIndex]) - 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 *State) 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: State: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: State: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType) - } - m.LastBlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastBlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastBlockID", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastBlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastBlockTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastBlockTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextValidators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NextValidators == nil { - m.NextValidators = &types1.ValidatorSet{} - } - if err := m.NextValidators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - 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 ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Validators == nil { - m.Validators = &types1.ValidatorSet{} - } - if err := m.Validators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastValidators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastValidators == nil { - m.LastValidators = &types1.ValidatorSet{} - } - if err := m.LastValidators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastHeightValidatorsChanged", wireType) - } - m.LastHeightValidatorsChanged = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastHeightValidatorsChanged |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastHeightConsensusParamsChanged", wireType) - } - m.LastHeightConsensusParamsChanged = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastHeightConsensusParamsChanged |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", 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 - } - m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) - if m.LastResultsHash == nil { - m.LastResultsHash = []byte{} - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppHash", 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 - } - m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) - if m.AppHash == nil { - m.AppHash = []byte{} - } - 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") -) diff --git a/proto/types/block.pb.go b/proto/types/block.pb.go index 6dc9e4ac5..348e47061 100644 --- a/proto/types/block.pb.go +++ b/proto/types/block.pb.go @@ -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") -) diff --git a/proto/types/evidence.pb.go b/proto/types/evidence.pb.go index e150faf05..93a461db3 100644 --- a/proto/types/evidence.pb.go +++ b/proto/types/evidence.pb.go @@ -4,17 +4,11 @@ package types import ( - bytes "bytes" fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "github.com/golang/protobuf/ptypes/timestamp" - io "io" math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" time "time" ) @@ -33,35 +27,30 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // DuplicateVoteEvidence contains evidence a validator signed two conflicting // votes. type DuplicateVoteEvidence struct { - VoteA *Vote `protobuf:"bytes,1,opt,name=vote_a,json=voteA,proto3" json:"vote_a,omitempty"` - VoteB *Vote `protobuf:"bytes,2,opt,name=vote_b,json=voteB,proto3" json:"vote_b,omitempty"` + VoteA *Vote `protobuf:"bytes,1,opt,name=vote_a,json=voteA,proto3" json:"vote_a,omitempty"` + VoteB *Vote `protobuf:"bytes,2,opt,name=vote_b,json=voteB,proto3" json:"vote_b,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DuplicateVoteEvidence) Reset() { *m = DuplicateVoteEvidence{} } -func (*DuplicateVoteEvidence) ProtoMessage() {} +func (m *DuplicateVoteEvidence) Reset() { *m = DuplicateVoteEvidence{} } +func (m *DuplicateVoteEvidence) String() string { return proto.CompactTextString(m) } +func (*DuplicateVoteEvidence) ProtoMessage() {} func (*DuplicateVoteEvidence) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{0} } func (m *DuplicateVoteEvidence) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_DuplicateVoteEvidence.Unmarshal(m, b) } func (m *DuplicateVoteEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DuplicateVoteEvidence.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_DuplicateVoteEvidence.Marshal(b, m, deterministic) } func (m *DuplicateVoteEvidence) XXX_Merge(src proto.Message) { xxx_messageInfo_DuplicateVoteEvidence.Merge(m, src) } func (m *DuplicateVoteEvidence) XXX_Size() int { - return m.Size() + return xxx_messageInfo_DuplicateVoteEvidence.Size(m) } func (m *DuplicateVoteEvidence) XXX_DiscardUnknown() { xxx_messageInfo_DuplicateVoteEvidence.DiscardUnknown(m) @@ -85,36 +74,31 @@ func (m *DuplicateVoteEvidence) GetVoteB() *Vote { // MockEvidence is used for testing pruposes type MockEvidence struct { - EvidenceHeight int64 `protobuf:"varint,1,opt,name=evidence_height,json=evidenceHeight,proto3" json:"evidence_height,omitempty"` - EvidenceTime time.Time `protobuf:"bytes,2,opt,name=evidence_time,json=evidenceTime,proto3,stdtime" json:"evidence_time"` - EvidenceAddress []byte `protobuf:"bytes,3,opt,name=evidence_address,json=evidenceAddress,proto3" json:"evidence_address,omitempty"` + EvidenceHeight int64 `protobuf:"varint,1,opt,name=evidence_height,json=evidenceHeight,proto3" json:"evidence_height,omitempty"` + EvidenceTime time.Time `protobuf:"bytes,2,opt,name=evidence_time,json=evidenceTime,proto3,stdtime" json:"evidence_time"` + EvidenceAddress []byte `protobuf:"bytes,3,opt,name=evidence_address,json=evidenceAddress,proto3" json:"evidence_address,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *MockEvidence) Reset() { *m = MockEvidence{} } -func (*MockEvidence) ProtoMessage() {} +func (m *MockEvidence) Reset() { *m = MockEvidence{} } +func (m *MockEvidence) String() string { return proto.CompactTextString(m) } +func (*MockEvidence) ProtoMessage() {} func (*MockEvidence) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{1} } func (m *MockEvidence) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_MockEvidence.Unmarshal(m, b) } func (m *MockEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MockEvidence.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_MockEvidence.Marshal(b, m, deterministic) } func (m *MockEvidence) XXX_Merge(src proto.Message) { xxx_messageInfo_MockEvidence.Merge(m, src) } func (m *MockEvidence) XXX_Size() int { - return m.Size() + return xxx_messageInfo_MockEvidence.Size(m) } func (m *MockEvidence) XXX_DiscardUnknown() { xxx_messageInfo_MockEvidence.DiscardUnknown(m) @@ -147,34 +131,29 @@ type Evidence struct { // Types that are valid to be assigned to Sum: // *Evidence_DuplicateVoteEvidence // *Evidence_MockEvidence - Sum isEvidence_Sum `protobuf_oneof:"sum"` + Sum isEvidence_Sum `protobuf_oneof:"sum"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Evidence) Reset() { *m = Evidence{} } -func (*Evidence) ProtoMessage() {} +func (m *Evidence) Reset() { *m = Evidence{} } +func (m *Evidence) String() string { return proto.CompactTextString(m) } +func (*Evidence) ProtoMessage() {} func (*Evidence) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{2} } func (m *Evidence) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Evidence.Unmarshal(m, b) } func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Evidence.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_Evidence.Marshal(b, m, deterministic) } func (m *Evidence) XXX_Merge(src proto.Message) { xxx_messageInfo_Evidence.Merge(m, src) } func (m *Evidence) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Evidence.Size(m) } func (m *Evidence) XXX_DiscardUnknown() { xxx_messageInfo_Evidence.DiscardUnknown(m) @@ -184,9 +163,6 @@ var xxx_messageInfo_Evidence proto.InternalMessageInfo type isEvidence_Sum interface { isEvidence_Sum() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int } type Evidence_DuplicateVoteEvidence struct { @@ -230,35 +206,30 @@ func (*Evidence) XXX_OneofWrappers() []interface{} { // EvidenceData contains any evidence of malicious wrong-doing by validators type EvidenceData struct { - Evidence []Evidence `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence"` - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + Evidence []Evidence `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *EvidenceData) Reset() { *m = EvidenceData{} } -func (*EvidenceData) ProtoMessage() {} +func (m *EvidenceData) Reset() { *m = EvidenceData{} } +func (m *EvidenceData) String() string { return proto.CompactTextString(m) } +func (*EvidenceData) ProtoMessage() {} func (*EvidenceData) Descriptor() ([]byte, []int) { return fileDescriptor_86495eef24aeacc0, []int{3} } func (m *EvidenceData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_EvidenceData.Unmarshal(m, b) } func (m *EvidenceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EvidenceData.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_EvidenceData.Marshal(b, m, deterministic) } func (m *EvidenceData) XXX_Merge(src proto.Message) { xxx_messageInfo_EvidenceData.Merge(m, src) } func (m *EvidenceData) XXX_Size() int { - return m.Size() + return xxx_messageInfo_EvidenceData.Size(m) } func (m *EvidenceData) XXX_DiscardUnknown() { xxx_messageInfo_EvidenceData.DiscardUnknown(m) @@ -290,1266 +261,31 @@ func init() { func init() { proto.RegisterFile("proto/types/evidence.proto", fileDescriptor_86495eef24aeacc0) } var fileDescriptor_86495eef24aeacc0 = []byte{ - // 459 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x41, 0x6b, 0xdb, 0x30, - 0x18, 0x95, 0x96, 0xb6, 0x04, 0xd5, 0xdd, 0x86, 0xa1, 0x6b, 0x08, 0x43, 0x09, 0x61, 0x6c, 0x19, - 0x6c, 0x32, 0xb4, 0xbf, 0xa0, 0xa6, 0x83, 0x8c, 0xb1, 0x8b, 0x18, 0x3b, 0xec, 0x12, 0x64, 0x5b, - 0xb5, 0x4d, 0xeb, 0xc8, 0xd8, 0x4a, 0xa1, 0xb7, 0xed, 0x1f, 0xf4, 0x67, 0xec, 0xb2, 0xdf, 0xb1, - 0x1e, 0x73, 0xec, 0x69, 0x5b, 0x9c, 0xcb, 0x8e, 0xf9, 0x09, 0xc3, 0x92, 0xa5, 0xf8, 0x90, 0xc0, - 0x2e, 0xe1, 0xd3, 0xa7, 0xf7, 0x9e, 0xde, 0x7b, 0x31, 0xea, 0xe7, 0x85, 0x90, 0xc2, 0x93, 0xb7, - 0x39, 0x2f, 0x3d, 0x7e, 0x93, 0x46, 0x7c, 0x16, 0x72, 0xa2, 0x96, 0xee, 0x33, 0xc9, 0x67, 0x11, - 0x2f, 0xb2, 0x74, 0x26, 0xf5, 0x86, 0x28, 0x58, 0xff, 0xa5, 0x4c, 0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0x65, - 0x37, 0xf0, 0xa6, 0xb7, 0xb7, 0xbb, 0x2a, 0xd8, 0x5a, 0xfb, 0x04, 0xd0, 0xe3, 0x68, 0xeb, 0xff, - 0xf1, 0x01, 0x1d, 0x65, 0x22, 0xbc, 0xda, 0xc8, 0xeb, 0xac, 0x2f, 0x76, 0xc9, 0xb7, 0x1b, 0x9d, - 0x00, 0xea, 0x64, 0xad, 0xb3, 0xbf, 0x8f, 0x3a, 0xe5, 0x3c, 0x1b, 0x5d, 0x22, 0xc7, 0xac, 0x2e, - 0x98, 0x64, 0xae, 0x8f, 0xba, 0x2d, 0xf7, 0x9d, 0xf1, 0xe1, 0xe9, 0x70, 0x97, 0xbc, 0x95, 0xda, - 0xab, 0x0b, 0xa5, 0x96, 0xe7, 0xba, 0x68, 0x2f, 0x61, 0x65, 0xa2, 0xec, 0x39, 0x54, 0xcd, 0x7e, - 0xb0, 0x58, 0x62, 0xf0, 0xb0, 0xc4, 0x60, 0xbd, 0xc4, 0xf0, 0x6b, 0x85, 0xe1, 0xf7, 0x0a, 0xc3, - 0xfb, 0x0a, 0xc3, 0x45, 0x85, 0xe1, 0x9f, 0x0a, 0xc3, 0xbf, 0x15, 0x06, 0xeb, 0x0a, 0xc3, 0xbb, - 0x15, 0x06, 0x8b, 0x15, 0x06, 0x0f, 0x2b, 0x0c, 0xbe, 0xbc, 0x89, 0x53, 0x99, 0xcc, 0x03, 0x12, - 0x8a, 0xcc, 0xdb, 0xb8, 0x68, 0x8f, 0xad, 0xcf, 0x3e, 0x38, 0x50, 0x87, 0xb3, 0x7f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x12, 0xa1, 0x1c, 0xe6, 0x68, 0x03, 0x00, 0x00, -} - -func (this *DuplicateVoteEvidence) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DuplicateVoteEvidence) - if !ok { - that2, ok := that.(DuplicateVoteEvidence) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.VoteA.Equal(that1.VoteA) { - return false - } - if !this.VoteB.Equal(that1.VoteB) { - return false - } - return true -} -func (this *MockEvidence) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MockEvidence) - if !ok { - that2, ok := that.(MockEvidence) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.EvidenceHeight != that1.EvidenceHeight { - return false - } - if !this.EvidenceTime.Equal(that1.EvidenceTime) { - return false - } - if !bytes.Equal(this.EvidenceAddress, that1.EvidenceAddress) { - return false - } - return true -} -func (this *Evidence) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Evidence) - if !ok { - that2, ok := that.(Evidence) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Sum == nil { - if this.Sum != nil { - return false - } - } else if this.Sum == nil { - return false - } else if !this.Sum.Equal(that1.Sum) { - return false - } - return true -} -func (this *Evidence_DuplicateVoteEvidence) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Evidence_DuplicateVoteEvidence) - if !ok { - that2, ok := that.(Evidence_DuplicateVoteEvidence) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.DuplicateVoteEvidence.Equal(that1.DuplicateVoteEvidence) { - return false - } - return true -} -func (this *Evidence_MockEvidence) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Evidence_MockEvidence) - if !ok { - that2, ok := that.(Evidence_MockEvidence) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.MockEvidence.Equal(that1.MockEvidence) { - return false - } - return true -} -func (this *EvidenceData) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*EvidenceData) - if !ok { - that2, ok := that.(EvidenceData) - 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 - } - } - if !bytes.Equal(this.Hash, that1.Hash) { - return false - } - return true -} -func (this *DuplicateVoteEvidence) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.DuplicateVoteEvidence{") - if this.VoteA != nil { - s = append(s, "VoteA: "+fmt.Sprintf("%#v", this.VoteA)+",\n") - } - if this.VoteB != nil { - s = append(s, "VoteB: "+fmt.Sprintf("%#v", this.VoteB)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MockEvidence) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&types.MockEvidence{") - s = append(s, "EvidenceHeight: "+fmt.Sprintf("%#v", this.EvidenceHeight)+",\n") - s = append(s, "EvidenceTime: "+fmt.Sprintf("%#v", this.EvidenceTime)+",\n") - s = append(s, "EvidenceAddress: "+fmt.Sprintf("%#v", this.EvidenceAddress)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Evidence) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.Evidence{") - if this.Sum != nil { - s = append(s, "Sum: "+fmt.Sprintf("%#v", this.Sum)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Evidence_DuplicateVoteEvidence) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&types.Evidence_DuplicateVoteEvidence{` + - `DuplicateVoteEvidence:` + fmt.Sprintf("%#v", this.DuplicateVoteEvidence) + `}`}, ", ") - return s -} -func (this *Evidence_MockEvidence) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&types.Evidence_MockEvidence{` + - `MockEvidence:` + fmt.Sprintf("%#v", this.MockEvidence) + `}`}, ", ") - return s -} -func (this *EvidenceData) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.EvidenceData{") - if this.Evidence != nil { - vs := make([]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, "Hash: "+fmt.Sprintf("%#v", this.Hash)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringEvidence(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 *DuplicateVoteEvidence) 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 *DuplicateVoteEvidence) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DuplicateVoteEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.VoteB != nil { - { - size, err := m.VoteB.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvidence(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.VoteA != nil { - { - size, err := m.VoteA.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvidence(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MockEvidence) 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 *MockEvidence) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MockEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EvidenceAddress) > 0 { - i -= len(m.EvidenceAddress) - copy(dAtA[i:], m.EvidenceAddress) - i = encodeVarintEvidence(dAtA, i, uint64(len(m.EvidenceAddress))) - i-- - dAtA[i] = 0x1a - } - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EvidenceTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EvidenceTime):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintEvidence(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x12 - if m.EvidenceHeight != 0 { - i = encodeVarintEvidence(dAtA, i, uint64(m.EvidenceHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Evidence) 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 *Evidence) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Evidence) 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 *Evidence_DuplicateVoteEvidence) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Evidence_DuplicateVoteEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DuplicateVoteEvidence != nil { - { - size, err := m.DuplicateVoteEvidence.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvidence(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *Evidence_MockEvidence) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Evidence_MockEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.MockEvidence != nil { - { - size, err := m.MockEvidence.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvidence(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *EvidenceData) 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 *EvidenceData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EvidenceData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintEvidence(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x12 - } - 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 = encodeVarintEvidence(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintEvidence(dAtA []byte, offset int, v uint64) int { - offset -= sovEvidence(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *DuplicateVoteEvidence) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.VoteA != nil { - l = m.VoteA.Size() - n += 1 + l + sovEvidence(uint64(l)) - } - if m.VoteB != nil { - l = m.VoteB.Size() - n += 1 + l + sovEvidence(uint64(l)) - } - return n -} - -func (m *MockEvidence) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EvidenceHeight != 0 { - n += 1 + sovEvidence(uint64(m.EvidenceHeight)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EvidenceTime) - n += 1 + l + sovEvidence(uint64(l)) - l = len(m.EvidenceAddress) - if l > 0 { - n += 1 + l + sovEvidence(uint64(l)) - } - return n -} - -func (m *Evidence) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sum != nil { - n += m.Sum.Size() - } - return n -} - -func (m *Evidence_DuplicateVoteEvidence) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DuplicateVoteEvidence != nil { - l = m.DuplicateVoteEvidence.Size() - n += 1 + l + sovEvidence(uint64(l)) - } - return n -} -func (m *Evidence_MockEvidence) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MockEvidence != nil { - l = m.MockEvidence.Size() - n += 1 + l + sovEvidence(uint64(l)) - } - return n -} -func (m *EvidenceData) 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 + sovEvidence(uint64(l)) - } - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovEvidence(uint64(l)) - } - return n -} - -func sovEvidence(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEvidence(x uint64) (n int) { - return sovEvidence(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *DuplicateVoteEvidence) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DuplicateVoteEvidence{`, - `VoteA:` + strings.Replace(fmt.Sprintf("%v", this.VoteA), "Vote", "Vote", 1) + `,`, - `VoteB:` + strings.Replace(fmt.Sprintf("%v", this.VoteB), "Vote", "Vote", 1) + `,`, - `}`, - }, "") - return s -} -func (this *MockEvidence) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&MockEvidence{`, - `EvidenceHeight:` + fmt.Sprintf("%v", this.EvidenceHeight) + `,`, - `EvidenceTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvidenceTime), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`, - `EvidenceAddress:` + fmt.Sprintf("%v", this.EvidenceAddress) + `,`, - `}`, - }, "") - return s -} -func (this *Evidence) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Evidence{`, - `Sum:` + fmt.Sprintf("%v", this.Sum) + `,`, - `}`, - }, "") - return s -} -func (this *Evidence_DuplicateVoteEvidence) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Evidence_DuplicateVoteEvidence{`, - `DuplicateVoteEvidence:` + strings.Replace(fmt.Sprintf("%v", this.DuplicateVoteEvidence), "DuplicateVoteEvidence", "DuplicateVoteEvidence", 1) + `,`, - `}`, - }, "") - return s -} -func (this *Evidence_MockEvidence) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Evidence_MockEvidence{`, - `MockEvidence:` + strings.Replace(fmt.Sprintf("%v", this.MockEvidence), "MockEvidence", "MockEvidence", 1) + `,`, - `}`, - }, "") - return s -} -func (this *EvidenceData) String() string { - if this == nil { - return "nil" - } - repeatedStringForEvidence := "[]Evidence{" - for _, f := range this.Evidence { - repeatedStringForEvidence += strings.Replace(strings.Replace(f.String(), "Evidence", "Evidence", 1), `&`, ``, 1) + "," - } - repeatedStringForEvidence += "}" - s := strings.Join([]string{`&EvidenceData{`, - `Evidence:` + repeatedStringForEvidence + `,`, - `Hash:` + fmt.Sprintf("%v", this.Hash) + `,`, - `}`, - }, "") - return s -} -func valueToStringEvidence(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *DuplicateVoteEvidence) 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 ErrIntOverflowEvidence - } - 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: DuplicateVoteEvidence: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DuplicateVoteEvidence: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VoteA", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvidence - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.VoteA == nil { - m.VoteA = &Vote{} - } - if err := m.VoteA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VoteB", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvidence - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.VoteB == nil { - m.VoteB = &Vote{} - } - if err := m.VoteB.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvidence(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvidence - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvidence - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MockEvidence) 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 ErrIntOverflowEvidence - } - 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: MockEvidence: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MockEvidence: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHeight", wireType) - } - m.EvidenceHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EvidenceHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvidence - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EvidenceTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEvidence - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EvidenceAddress = append(m.EvidenceAddress[:0], dAtA[iNdEx:postIndex]...) - if m.EvidenceAddress == nil { - m.EvidenceAddress = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvidence(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvidence - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvidence - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Evidence) 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 ErrIntOverflowEvidence - } - 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: Evidence: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DuplicateVoteEvidence", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvidence - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &DuplicateVoteEvidence{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Evidence_DuplicateVoteEvidence{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MockEvidence", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvidence - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &MockEvidence{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Evidence_MockEvidence{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvidence(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvidence - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvidence - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil + // 404 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xd1, 0x6a, 0xe2, 0x40, + 0x14, 0x35, 0x1b, 0x15, 0x19, 0xe3, 0xee, 0x12, 0x70, 0x95, 0xb0, 0xa0, 0x84, 0x65, 0xd7, 0x85, + 0xdd, 0x09, 0xe8, 0x17, 0x18, 0x2c, 0x58, 0x4a, 0x5f, 0x86, 0xd2, 0x87, 0xbe, 0x84, 0x49, 0x32, + 0x26, 0x41, 0xe3, 0x84, 0x64, 0x22, 0xf8, 0xd8, 0x3f, 0xe8, 0x8f, 0xf4, 0x3b, 0xda, 0xaf, 0x68, + 0x7f, 0xa5, 0x64, 0x26, 0x33, 0xe6, 0x41, 0xa1, 0x2f, 0x72, 0xe7, 0xce, 0x39, 0x67, 0xce, 0x39, + 0x06, 0x58, 0x59, 0x4e, 0x19, 0x75, 0xd8, 0x31, 0x23, 0x85, 0x43, 0x0e, 0x49, 0x48, 0xf6, 0x01, + 0x81, 0x7c, 0x69, 0xfe, 0x60, 0x64, 0x1f, 0x92, 0x3c, 0x4d, 0xf6, 0x4c, 0x6c, 0x20, 0x87, 0x59, + 0xbf, 0x59, 0x9c, 0xe4, 0xa1, 0x97, 0xe1, 0x9c, 0x1d, 0x1d, 0xc1, 0x8f, 0x68, 0x44, 0x4f, 0x93, + 0x40, 0x5b, 0xa3, 0xa6, 0x36, 0xff, 0xad, 0x2f, 0x26, 0x11, 0xa5, 0xd1, 0x8e, 0x08, 0xae, 0x5f, + 0x6e, 0x1c, 0x96, 0xa4, 0xa4, 0x60, 0x38, 0xcd, 0x04, 0xc0, 0x7e, 0xd4, 0xc0, 0x70, 0x55, 0x66, + 0xbb, 0x24, 0xc0, 0x8c, 0xdc, 0x53, 0x46, 0xae, 0x6a, 0x67, 0xe6, 0x02, 0x74, 0x0f,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0a, 0x45, 0x8a, 0x67, 0x9a, 0xa0, 0x1d, 0xe3, 0x22, 0xe6, 0xf6, 0x0c, 0xc4, + 0x67, 0x17, 0x3e, 0xfc, 0x8b, 0x12, 0x16, 0x97, 0x3e, 0x0c, 0x68, 0xea, 0x9c, 0x14, 0x9b, 0x63, + 0xe3, 0x13, 0xf6, 0xbb, 0xfc, 0xb0, 0xf8, 0x08, 0x00, 0x00, 0xff, 0xff, 0x08, 0xfc, 0xe8, 0x04, + 0x34, 0x03, 0x00, 0x00, } -func (m *EvidenceData) 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 ErrIntOverflowEvidence - } - 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: EvidenceData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EvidenceData: 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 ErrIntOverflowEvidence - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvidence - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Evidence = append(m.Evidence, Evidence{}) - if err := m.Evidence[len(m.Evidence)-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 Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEvidence - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvidence(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvidence - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvidence - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEvidence(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, ErrIntOverflowEvidence - } - 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, ErrIntOverflowEvidence - } - 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, ErrIntOverflowEvidence - } - 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, ErrInvalidLengthEvidence - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvidence - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEvidence - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEvidence = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvidence = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvidence = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/types/params.pb.go b/proto/types/params.pb.go index 1aaef04fd..359a8e346 100644 --- a/proto/types/params.pb.go +++ b/proto/types/params.pb.go @@ -4,16 +4,13 @@ package types import ( + bytes "bytes" fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "github.com/golang/protobuf/ptypes/duration" - io "io" math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" time "time" ) @@ -32,36 +29,31 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // ConsensusParams contains consensus critical parameters that determine the // validity of blocks. type ConsensusParams struct { - Block BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block"` - Evidence EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence"` - Validator ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator"` + Block BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block"` + Evidence EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence"` + Validator ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ConsensusParams) Reset() { *m = ConsensusParams{} } -func (*ConsensusParams) ProtoMessage() {} +func (m *ConsensusParams) Reset() { *m = ConsensusParams{} } +func (m *ConsensusParams) String() string { return proto.CompactTextString(m) } +func (*ConsensusParams) ProtoMessage() {} func (*ConsensusParams) Descriptor() ([]byte, []int) { return fileDescriptor_95a9f934fa6f056c, []int{0} } func (m *ConsensusParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ConsensusParams.Unmarshal(m, b) } func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusParams.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_ConsensusParams.Marshal(b, m, deterministic) } func (m *ConsensusParams) XXX_Merge(src proto.Message) { xxx_messageInfo_ConsensusParams.Merge(m, src) } func (m *ConsensusParams) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ConsensusParams.Size(m) } func (m *ConsensusParams) XXX_DiscardUnknown() { xxx_messageInfo_ConsensusParams.DiscardUnknown(m) @@ -98,34 +90,29 @@ type BlockParams struct { MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"` // Minimum time increment between consecutive blocks (in milliseconds) // Not exposed to the application. - TimeIotaMs int64 `protobuf:"varint,3,opt,name=time_iota_ms,json=timeIotaMs,proto3" json:"time_iota_ms,omitempty"` + TimeIotaMs int64 `protobuf:"varint,3,opt,name=time_iota_ms,json=timeIotaMs,proto3" json:"time_iota_ms,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *BlockParams) Reset() { *m = BlockParams{} } -func (*BlockParams) ProtoMessage() {} +func (m *BlockParams) Reset() { *m = BlockParams{} } +func (m *BlockParams) String() string { return proto.CompactTextString(m) } +func (*BlockParams) ProtoMessage() {} func (*BlockParams) Descriptor() ([]byte, []int) { return fileDescriptor_95a9f934fa6f056c, []int{1} } func (m *BlockParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_BlockParams.Unmarshal(m, b) } func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockParams.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_BlockParams.Marshal(b, m, deterministic) } func (m *BlockParams) XXX_Merge(src proto.Message) { xxx_messageInfo_BlockParams.Merge(m, src) } func (m *BlockParams) XXX_Size() int { - return m.Size() + return xxx_messageInfo_BlockParams.Size(m) } func (m *BlockParams) XXX_DiscardUnknown() { xxx_messageInfo_BlockParams.DiscardUnknown(m) @@ -157,35 +144,30 @@ func (m *BlockParams) GetTimeIotaMs() int64 { // EvidenceParams determine how we handle evidence of malfeasance. type EvidenceParams struct { // Note: must be greater than 0 - MaxAgeNumBlocks int64 `protobuf:"varint,1,opt,name=max_age_num_blocks,json=maxAgeNumBlocks,proto3" json:"max_age_num_blocks,omitempty"` - MaxAgeDuration time.Duration `protobuf:"bytes,2,opt,name=max_age_duration,json=maxAgeDuration,proto3,stdduration" json:"max_age_duration"` + MaxAgeNumBlocks int64 `protobuf:"varint,1,opt,name=max_age_num_blocks,json=maxAgeNumBlocks,proto3" json:"max_age_num_blocks,omitempty"` + MaxAgeDuration time.Duration `protobuf:"bytes,2,opt,name=max_age_duration,json=maxAgeDuration,proto3,stdduration" json:"max_age_duration"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *EvidenceParams) Reset() { *m = EvidenceParams{} } -func (*EvidenceParams) ProtoMessage() {} +func (m *EvidenceParams) Reset() { *m = EvidenceParams{} } +func (m *EvidenceParams) String() string { return proto.CompactTextString(m) } +func (*EvidenceParams) ProtoMessage() {} func (*EvidenceParams) Descriptor() ([]byte, []int) { return fileDescriptor_95a9f934fa6f056c, []int{2} } func (m *EvidenceParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_EvidenceParams.Unmarshal(m, b) } func (m *EvidenceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EvidenceParams.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_EvidenceParams.Marshal(b, m, deterministic) } func (m *EvidenceParams) XXX_Merge(src proto.Message) { xxx_messageInfo_EvidenceParams.Merge(m, src) } func (m *EvidenceParams) XXX_Size() int { - return m.Size() + return xxx_messageInfo_EvidenceParams.Size(m) } func (m *EvidenceParams) XXX_DiscardUnknown() { xxx_messageInfo_EvidenceParams.DiscardUnknown(m) @@ -210,34 +192,29 @@ func (m *EvidenceParams) GetMaxAgeDuration() time.Duration { // ValidatorParams restrict the public key types validators can use. // NOTE: uses ABCI pubkey naming, not Amino names. type ValidatorParams struct { - PubKeyTypes []string `protobuf:"bytes,1,rep,name=pub_key_types,json=pubKeyTypes,proto3" json:"pub_key_types,omitempty"` + PubKeyTypes []string `protobuf:"bytes,1,rep,name=pub_key_types,json=pubKeyTypes,proto3" json:"pub_key_types,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ValidatorParams) Reset() { *m = ValidatorParams{} } -func (*ValidatorParams) ProtoMessage() {} +func (m *ValidatorParams) Reset() { *m = ValidatorParams{} } +func (m *ValidatorParams) String() string { return proto.CompactTextString(m) } +func (*ValidatorParams) ProtoMessage() {} func (*ValidatorParams) Descriptor() ([]byte, []int) { return fileDescriptor_95a9f934fa6f056c, []int{3} } func (m *ValidatorParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ValidatorParams.Unmarshal(m, b) } func (m *ValidatorParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorParams.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_ValidatorParams.Marshal(b, m, deterministic) } func (m *ValidatorParams) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatorParams.Merge(m, src) } func (m *ValidatorParams) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ValidatorParams.Size(m) } func (m *ValidatorParams) XXX_DiscardUnknown() { xxx_messageInfo_ValidatorParams.DiscardUnknown(m) @@ -256,35 +233,30 @@ func (m *ValidatorParams) GetPubKeyTypes() []string { // It is amino encoded and hashed into // the Header.ConsensusHash. type HashedParams struct { - BlockMaxBytes int64 `protobuf:"varint,1,opt,name=block_max_bytes,json=blockMaxBytes,proto3" json:"block_max_bytes,omitempty"` - BlockMaxGas int64 `protobuf:"varint,2,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"` + BlockMaxBytes int64 `protobuf:"varint,1,opt,name=block_max_bytes,json=blockMaxBytes,proto3" json:"block_max_bytes,omitempty"` + BlockMaxGas int64 `protobuf:"varint,2,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *HashedParams) Reset() { *m = HashedParams{} } -func (*HashedParams) ProtoMessage() {} +func (m *HashedParams) Reset() { *m = HashedParams{} } +func (m *HashedParams) String() string { return proto.CompactTextString(m) } +func (*HashedParams) ProtoMessage() {} func (*HashedParams) Descriptor() ([]byte, []int) { return fileDescriptor_95a9f934fa6f056c, []int{4} } func (m *HashedParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HashedParams.Unmarshal(m, b) } func (m *HashedParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HashedParams.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_HashedParams.Marshal(b, m, deterministic) } func (m *HashedParams) XXX_Merge(src proto.Message) { xxx_messageInfo_HashedParams.Merge(m, src) } func (m *HashedParams) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HashedParams.Size(m) } func (m *HashedParams) XXX_DiscardUnknown() { xxx_messageInfo_HashedParams.DiscardUnknown(m) @@ -317,102 +289,39 @@ func init() { func init() { proto.RegisterFile("proto/types/params.proto", fileDescriptor_95a9f934fa6f056c) } var fileDescriptor_95a9f934fa6f056c = []byte{ - // 522 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0x31, 0x6f, 0xd3, 0x4c, - 0x18, 0xf6, 0x7d, 0xfe, 0x28, 0xc9, 0xa5, 0x69, 0xd0, 0x0d, 0x60, 0x8a, 0x74, 0x89, 0x8c, 0x14, - 0x2a, 0x81, 0x6c, 0x09, 0x36, 0x96, 0x0a, 0x03, 0x6a, 0x51, 0x15, 0x84, 0x2c, 0xc4, 0xd0, 0xc5, - 0x3a, 0xc7, 0x87, 0x63, 0x35, 0xe7, 0xb3, 0x7c, 0xe7, 0x2a, 0xde, 0xf8, 0x09, 0x4c, 0x88, 0xb1, - 0x23, 0x3f, 0x81, 0x9f, 0xd0, 0x31, 0x63, 0x27, 0x20, 0xce, 0x52, 0xb6, 0xfe, 0x04, 0xe4, 0x73, - 0x8c, 0x93, 0x8a, 0x6e, 0x77, 0xef, 0xfb, 0x3c, 0xcf, 0xbd, 0x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0x15, 0x18, 0x7c, 0x2b, 0x30, 0x38, 0x2f, 0x30, - 0x98, 0x17, 0x18, 0xfc, 0x2a, 0x30, 0xb8, 0x2c, 0xb0, 0x76, 0x55, 0x60, 0xf0, 0x79, 0x89, 0xb5, - 0xf9, 0x12, 0x6b, 0x17, 0x4b, 0xac, 0x1d, 0x3f, 0x09, 0x23, 0x39, 0xc9, 0x7c, 0x6b, 0xcc, 0x99, - 0xdd, 0x7c, 0x16, 0xeb, 0xc7, 0xb5, 0x3f, 0xcb, 0xdf, 0x52, 0x97, 0x67, 0x7f, 0x02, 0x00, 0x00, - 0xff, 0xff, 0x9d, 0x68, 0x1b, 0x81, 0x6f, 0x03, 0x00, 0x00, + // 465 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xd1, 0x6e, 0xd3, 0x30, + 0x14, 0x25, 0x04, 0x46, 0x7b, 0xbb, 0xae, 0xc8, 0x0f, 0x10, 0x86, 0x44, 0xab, 0x20, 0x95, 0x49, + 0x20, 0x47, 0x82, 0x37, 0x5e, 0x26, 0x02, 0x68, 0x43, 0x53, 0x11, 0x8a, 0x10, 0x0f, 0x7b, 0xb1, + 0x6e, 0x1a, 0x93, 0x46, 0xab, 0xe3, 0x28, 0x76, 0xa6, 0xe6, 0x47, 0x10, 0x8f, 0xfb, 0x0c, 0x3e, + 0x81, 0xaf, 0x80, 0x57, 0xf8, 0x0b, 0x14, 0xbb, 0x21, 0xed, 0xb4, 0xbe, 0xd9, 0xf7, 0x9e, 0x73, + 0x7c, 0xcf, 0xb9, 0x32, 0x78, 0x45, 0x29, 0xb5, 0x0c, 0x74, 0x5d, 0x70, 0x15, 0x14, 0x58, 0xa2, + 0x50, 0xd4, 0x94, 0xc8, 0x03, 0xcd, 0xf3, 0x84, 0x97, 0x22, 0xcb, 0xb5, 0xad, 0x50, 0x03, 0x3a, + 0x9c, 0xea, 0x45, 0x56, 0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b0, 0x6d, 0x8b, 0x3c, 0x07, 0xd2, + 0xa8, 0x61, 0xca, 0x59, 0x5e, 0x09, 0x66, 0x52, 0x6a, 0xdf, 0x1c, 0x09, 0x5c, 0xbd, 0x49, 0xf9, + 0xc7, 0x4a, 0x98, 0xe1, 0x14, 0x99, 0xc1, 0xfd, 0x16, 0xdc, 0x2e, 0x6b, 0x9d, 0xe2, 0x23, 0x6a, + 0xb7, 0x49, 0xdb, 0x6d, 0xd2, 0x77, 0x6b, 0x40, 0xd8, 0x6b, 0xcc, 0x7e, 0xff, 0x3d, 0x76, 0xa2, + 0x03, 0xab, 0xd7, 0x76, 0x5e, 0xf7, 0x7e, 0x5c, 0x8d, 0x9d, 0x3f, 0x57, 0x63, 0xc7, 0x3f, 0x86, + 0xd1, 0xb5, 0x8c, 0x88, 0x0f, 0xc3, 0xa2, 0x8a, 0xd9, 0x05, 0xaf, 0x99, 0x09, 0xd1, 0x73, 0x26, + 0xee, 0x51, 0x3f, 0x1a, 0x14, 0x55, 0x7c, 0xc6, 0xeb, 0xcf, 0x4d, 0x69, 0x43, 0xe0, 0x1c, 0xf6, + 0x4f, 0x51, 0x2d, 0x78, 0xb2, 0x66, 0x4f, 0x61, 0x64, 0xac, 0xb0, 0xeb, 0x39, 0x0e, 0x4d, 0x79, + 0xd6, 0x86, 0xe9, 0xc3, 0xb0, 0xc3, 0x75, 0x91, 0x0e, 0x5a, 0xd4, 0x09, 0xaa, 0x90, 0x9e, 0xbf, + 0x48, 0x33, 0xbd, 0xa8, 0x62, 0x3a, 0x97, 0x22, 0xe8, 0x56, 0xbc, 0x79, 0xdc, 0xf8, 0x25, 0xf1, + 0x9e, 0xb9, 0xbc, 0xfa, 0x17, 0x00, 0x00, 0xff, 0xff, 0xc9, 0xc9, 0x35, 0x8e, 0x3b, 0x03, 0x00, + 0x00, } -func (this *ConsensusParams) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ConsensusParams) - if !ok { - that2, ok := that.(ConsensusParams) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Block.Equal(&that1.Block) { - return false - } - if !this.Evidence.Equal(&that1.Evidence) { - return false - } - if !this.Validator.Equal(&that1.Validator) { - return false - } - return true -} -func (this *BlockParams) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BlockParams) - if !ok { - that2, ok := that.(BlockParams) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.MaxBytes != that1.MaxBytes { - return false - } - if this.MaxGas != that1.MaxGas { - return false - } - if this.TimeIotaMs != that1.TimeIotaMs { - return false - } - return true -} func (this *EvidenceParams) Equal(that interface{}) bool { if that == nil { return this == nil @@ -438,6 +347,9 @@ func (this *EvidenceParams) Equal(that interface{}) bool { if this.MaxAgeDuration != that1.MaxAgeDuration { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ValidatorParams) Equal(that interface{}) bool { @@ -467,302 +379,11 @@ func (this *ValidatorParams) Equal(that interface{}) bool { return false } } - return true -} -func (this *HashedParams) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HashedParams) - if !ok { - that2, ok := that.(HashedParams) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.BlockMaxBytes != that1.BlockMaxBytes { - return false - } - if this.BlockMaxGas != that1.BlockMaxGas { + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } return true } -func (this *ConsensusParams) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&types.ConsensusParams{") - s = append(s, "Block: "+strings.Replace(this.Block.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Evidence: "+strings.Replace(this.Evidence.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Validator: "+strings.Replace(this.Validator.GoString(), `&`, ``, 1)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *BlockParams) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&types.BlockParams{") - s = append(s, "MaxBytes: "+fmt.Sprintf("%#v", this.MaxBytes)+",\n") - s = append(s, "MaxGas: "+fmt.Sprintf("%#v", this.MaxGas)+",\n") - s = append(s, "TimeIotaMs: "+fmt.Sprintf("%#v", this.TimeIotaMs)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *EvidenceParams) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.EvidenceParams{") - s = append(s, "MaxAgeNumBlocks: "+fmt.Sprintf("%#v", this.MaxAgeNumBlocks)+",\n") - s = append(s, "MaxAgeDuration: "+fmt.Sprintf("%#v", this.MaxAgeDuration)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ValidatorParams) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.ValidatorParams{") - s = append(s, "PubKeyTypes: "+fmt.Sprintf("%#v", this.PubKeyTypes)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *HashedParams) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.HashedParams{") - s = append(s, "BlockMaxBytes: "+fmt.Sprintf("%#v", this.BlockMaxBytes)+",\n") - s = append(s, "BlockMaxGas: "+fmt.Sprintf("%#v", this.BlockMaxGas)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringParams(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 *ConsensusParams) 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 *ConsensusParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BlockParams) 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 *BlockParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TimeIotaMs != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.TimeIotaMs)) - i-- - dAtA[i] = 0x18 - } - if m.MaxGas != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxGas)) - i-- - dAtA[i] = 0x10 - } - if m.MaxBytes != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxBytes)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *EvidenceParams) 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 *EvidenceParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EvidenceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration):]) - if err4 != nil { - return 0, err4 - } - i -= n4 - i = encodeVarintParams(dAtA, i, uint64(n4)) - i-- - dAtA[i] = 0x12 - if m.MaxAgeNumBlocks != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxAgeNumBlocks)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ValidatorParams) 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 *ValidatorParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PubKeyTypes) > 0 { - for iNdEx := len(m.PubKeyTypes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PubKeyTypes[iNdEx]) - copy(dAtA[i:], m.PubKeyTypes[iNdEx]) - i = encodeVarintParams(dAtA, i, uint64(len(m.PubKeyTypes[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *HashedParams) 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 *HashedParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HashedParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BlockMaxGas != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.BlockMaxGas)) - i-- - dAtA[i] = 0x10 - } - if m.BlockMaxBytes != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.BlockMaxBytes)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintParams(dAtA []byte, offset int, v uint64) int { - offset -= sovParams(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} func NewPopulatedEvidenceParams(r randyParams, easy bool) *EvidenceParams { this := &EvidenceParams{} this.MaxAgeNumBlocks = int64(r.Int63()) @@ -772,6 +393,7 @@ func NewPopulatedEvidenceParams(r randyParams, easy bool) *EvidenceParams { v1 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) this.MaxAgeDuration = *v1 if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedParams(r, 3) } return this } @@ -784,6 +406,7 @@ func NewPopulatedValidatorParams(r randyParams, easy bool) *ValidatorParams { this.PubKeyTypes[i] = string(randStringParams(r)) } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedParams(r, 2) } return this } @@ -860,777 +483,3 @@ func encodeVarintPopulateParams(dAtA []byte, v uint64) []byte { dAtA = append(dAtA, uint8(v)) return dAtA } -func (m *ConsensusParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Block.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.Evidence.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.Validator.Size() - n += 1 + l + sovParams(uint64(l)) - return n -} - -func (m *BlockParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MaxBytes != 0 { - n += 1 + sovParams(uint64(m.MaxBytes)) - } - if m.MaxGas != 0 { - n += 1 + sovParams(uint64(m.MaxGas)) - } - if m.TimeIotaMs != 0 { - n += 1 + sovParams(uint64(m.TimeIotaMs)) - } - return n -} - -func (m *EvidenceParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MaxAgeNumBlocks != 0 { - n += 1 + sovParams(uint64(m.MaxAgeNumBlocks)) - } - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration) - n += 1 + l + sovParams(uint64(l)) - return n -} - -func (m *ValidatorParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.PubKeyTypes) > 0 { - for _, s := range m.PubKeyTypes { - l = len(s) - n += 1 + l + sovParams(uint64(l)) - } - } - return n -} - -func (m *HashedParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockMaxBytes != 0 { - n += 1 + sovParams(uint64(m.BlockMaxBytes)) - } - if m.BlockMaxGas != 0 { - n += 1 + sovParams(uint64(m.BlockMaxGas)) - } - return n -} - -func sovParams(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozParams(x uint64) (n int) { - return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *ConsensusParams) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ConsensusParams{`, - `Block:` + strings.Replace(strings.Replace(this.Block.String(), "BlockParams", "BlockParams", 1), `&`, ``, 1) + `,`, - `Evidence:` + strings.Replace(strings.Replace(this.Evidence.String(), "EvidenceParams", "EvidenceParams", 1), `&`, ``, 1) + `,`, - `Validator:` + strings.Replace(strings.Replace(this.Validator.String(), "ValidatorParams", "ValidatorParams", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *BlockParams) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BlockParams{`, - `MaxBytes:` + fmt.Sprintf("%v", this.MaxBytes) + `,`, - `MaxGas:` + fmt.Sprintf("%v", this.MaxGas) + `,`, - `TimeIotaMs:` + fmt.Sprintf("%v", this.TimeIotaMs) + `,`, - `}`, - }, "") - return s -} -func (this *EvidenceParams) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EvidenceParams{`, - `MaxAgeNumBlocks:` + fmt.Sprintf("%v", this.MaxAgeNumBlocks) + `,`, - `MaxAgeDuration:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MaxAgeDuration), "Duration", "duration.Duration", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ValidatorParams) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ValidatorParams{`, - `PubKeyTypes:` + fmt.Sprintf("%v", this.PubKeyTypes) + `,`, - `}`, - }, "") - return s -} -func (this *HashedParams) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HashedParams{`, - `BlockMaxBytes:` + fmt.Sprintf("%v", this.BlockMaxBytes) + `,`, - `BlockMaxGas:` + fmt.Sprintf("%v", this.BlockMaxGas) + `,`, - `}`, - }, "") - return s -} -func valueToStringParams(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *ConsensusParams) 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 ErrIntOverflowParams - } - 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: ConsensusParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - 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 ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockParams) 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 ErrIntOverflowParams - } - 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: BlockParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType) - } - m.MaxBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxBytes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType) - } - m.MaxGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxGas |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeIotaMs", wireType) - } - m.TimeIotaMs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TimeIotaMs |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EvidenceParams) 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 ErrIntOverflowParams - } - 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: EvidenceParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EvidenceParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxAgeNumBlocks", wireType) - } - m.MaxAgeNumBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxAgeNumBlocks |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxAgeDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.MaxAgeDuration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorParams) 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 ErrIntOverflowParams - } - 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: ValidatorParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PubKeyTypes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PubKeyTypes = append(m.PubKeyTypes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HashedParams) 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 ErrIntOverflowParams - } - 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: HashedParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HashedParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxBytes", wireType) - } - m.BlockMaxBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockMaxBytes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxGas", wireType) - } - m.BlockMaxGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockMaxGas |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipParams(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, ErrIntOverflowParams - } - 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, ErrIntOverflowParams - } - 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, ErrIntOverflowParams - } - 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, ErrInvalidLengthParams - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupParams - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthParams - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/types/types.pb.go b/proto/types/types.pb.go index dc6e4984b..8a4dd72ea 100644 --- a/proto/types/types.pb.go +++ b/proto/types/types.pb.go @@ -12,12 +12,7 @@ import ( _ "github.com/golang/protobuf/ptypes/timestamp" bits "github.com/tendermint/tendermint/proto/libs/bits" version "github.com/tendermint/tendermint/proto/version" - io "io" math "math" - math_bits "math/bits" - reflect "reflect" - strconv "strconv" - strings "strings" time "time" ) @@ -91,35 +86,30 @@ func (SignedMsgType) EnumDescriptor() ([]byte, []int) { // PartsetHeader type PartSetHeader struct { - Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PartSetHeader) Reset() { *m = PartSetHeader{} } -func (*PartSetHeader) ProtoMessage() {} +func (m *PartSetHeader) Reset() { *m = PartSetHeader{} } +func (m *PartSetHeader) String() string { return proto.CompactTextString(m) } +func (*PartSetHeader) ProtoMessage() {} func (*PartSetHeader) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{0} } func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_PartSetHeader.Unmarshal(m, b) } func (m *PartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PartSetHeader.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_PartSetHeader.Marshal(b, m, deterministic) } func (m *PartSetHeader) XXX_Merge(src proto.Message) { xxx_messageInfo_PartSetHeader.Merge(m, src) } func (m *PartSetHeader) XXX_Size() int { - return m.Size() + return xxx_messageInfo_PartSetHeader.Size(m) } func (m *PartSetHeader) XXX_DiscardUnknown() { xxx_messageInfo_PartSetHeader.DiscardUnknown(m) @@ -143,35 +133,30 @@ func (m *PartSetHeader) GetHash() []byte { // BlockID type BlockID struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - PartsHeader PartSetHeader `protobuf:"bytes,2,opt,name=parts_header,json=partsHeader,proto3" json:"parts_header"` + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + PartsHeader PartSetHeader `protobuf:"bytes,2,opt,name=parts_header,json=partsHeader,proto3" json:"parts_header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *BlockID) Reset() { *m = BlockID{} } -func (*BlockID) ProtoMessage() {} +func (m *BlockID) Reset() { *m = BlockID{} } +func (m *BlockID) String() string { return proto.CompactTextString(m) } +func (*BlockID) ProtoMessage() {} func (*BlockID) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{1} } func (m *BlockID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_BlockID.Unmarshal(m, b) } func (m *BlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockID.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_BlockID.Marshal(b, m, deterministic) } func (m *BlockID) XXX_Merge(src proto.Message) { xxx_messageInfo_BlockID.Merge(m, src) } func (m *BlockID) XXX_Size() int { - return m.Size() + return xxx_messageInfo_BlockID.Size(m) } func (m *BlockID) XXX_DiscardUnknown() { xxx_messageInfo_BlockID.DiscardUnknown(m) @@ -212,35 +197,30 @@ type Header struct { AppHash []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` // consensus info - EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` - ProposerAddress []byte `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` + ProposerAddress []byte `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Header) Reset() { *m = Header{} } -func (*Header) ProtoMessage() {} +func (m *Header) Reset() { *m = Header{} } +func (m *Header) String() string { return proto.CompactTextString(m) } +func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{2} } func (m *Header) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Header.Unmarshal(m, b) } func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Header.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_Header.Marshal(b, m, deterministic) } func (m *Header) XXX_Merge(src proto.Message) { xxx_messageInfo_Header.Merge(m, src) } func (m *Header) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Header.Size(m) } func (m *Header) XXX_DiscardUnknown() { xxx_messageInfo_Header.DiscardUnknown(m) @@ -353,34 +333,29 @@ type Data struct { // This means that block.AppHash does not include these txs. Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` // Volatile - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Data) Reset() { *m = Data{} } -func (*Data) ProtoMessage() {} +func (m *Data) Reset() { *m = Data{} } +func (m *Data) String() string { return proto.CompactTextString(m) } +func (*Data) ProtoMessage() {} func (*Data) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{3} } func (m *Data) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Data.Unmarshal(m, b) } func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Data.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_Data.Marshal(b, m, deterministic) } func (m *Data) XXX_Merge(src proto.Message) { xxx_messageInfo_Data.Merge(m, src) } func (m *Data) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Data.Size(m) } func (m *Data) XXX_DiscardUnknown() { xxx_messageInfo_Data.DiscardUnknown(m) @@ -405,41 +380,36 @@ func (m *Data) GetHash() []byte { // Vote represents a prevote, precommit, or commit vote from validators for // consensus. type Vote struct { - Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` - BlockID BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"` - Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` - ValidatorAddress []byte `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - ValidatorIndex uint32 `protobuf:"varint,7,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"` - Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *Vote) Reset() { *m = Vote{} } -func (*Vote) ProtoMessage() {} + Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"` + Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` + BlockID BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"` + Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + ValidatorAddress []byte `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + ValidatorIndex uint32 `protobuf:"varint,7,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"` + Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Vote) Reset() { *m = Vote{} } +func (m *Vote) String() string { return proto.CompactTextString(m) } +func (*Vote) ProtoMessage() {} func (*Vote) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{4} } func (m *Vote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Vote.Unmarshal(m, b) } func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Vote.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_Vote.Marshal(b, m, deterministic) } func (m *Vote) XXX_Merge(src proto.Message) { xxx_messageInfo_Vote.Merge(m, src) } func (m *Vote) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Vote.Size(m) } func (m *Vote) XXX_DiscardUnknown() { xxx_messageInfo_Vote.DiscardUnknown(m) @@ -505,39 +475,34 @@ func (m *Vote) GetSignature() []byte { // Commit contains the evidence that a block was committed by a set of validators. type Commit struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` - BlockID BlockID `protobuf:"bytes,3,opt,name=block_id,json=blockId,proto3" json:"block_id"` - Signatures []CommitSig `protobuf:"bytes,4,rep,name=signatures,proto3" json:"signatures"` - Hash []byte `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"` - BitArray *bits.BitArray `protobuf:"bytes,6,opt,name=bit_array,json=bitArray,proto3" json:"bit_array,omitempty"` -} - -func (m *Commit) Reset() { *m = Commit{} } -func (*Commit) ProtoMessage() {} + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` + BlockID BlockID `protobuf:"bytes,3,opt,name=block_id,json=blockId,proto3" json:"block_id"` + Signatures []CommitSig `protobuf:"bytes,4,rep,name=signatures,proto3" json:"signatures"` + Hash []byte `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"` + BitArray *bits.BitArray `protobuf:"bytes,6,opt,name=bit_array,json=bitArray,proto3" json:"bit_array,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Commit) Reset() { *m = Commit{} } +func (m *Commit) String() string { return proto.CompactTextString(m) } +func (*Commit) ProtoMessage() {} func (*Commit) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{5} } func (m *Commit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Commit.Unmarshal(m, b) } func (m *Commit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Commit.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_Commit.Marshal(b, m, deterministic) } func (m *Commit) XXX_Merge(src proto.Message) { xxx_messageInfo_Commit.Merge(m, src) } func (m *Commit) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Commit.Size(m) } func (m *Commit) XXX_DiscardUnknown() { xxx_messageInfo_Commit.DiscardUnknown(m) @@ -589,37 +554,32 @@ func (m *Commit) GetBitArray() *bits.BitArray { // CommitSig is a part of the Vote included in a Commit. type CommitSig struct { - BlockIdFlag BlockIDFlag `protobuf:"varint,1,opt,name=block_id_flag,json=blockIdFlag,proto3,enum=tendermint.proto.types.BlockIDFlag" json:"block_id_flag,omitempty"` - ValidatorAddress []byte `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *CommitSig) Reset() { *m = CommitSig{} } -func (*CommitSig) ProtoMessage() {} + BlockIdFlag BlockIDFlag `protobuf:"varint,1,opt,name=block_id_flag,json=blockIdFlag,proto3,enum=tendermint.proto.types.BlockIDFlag" json:"block_id_flag,omitempty"` + ValidatorAddress []byte `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CommitSig) Reset() { *m = CommitSig{} } +func (m *CommitSig) String() string { return proto.CompactTextString(m) } +func (*CommitSig) ProtoMessage() {} func (*CommitSig) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{6} } func (m *CommitSig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_CommitSig.Unmarshal(m, b) } func (m *CommitSig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitSig.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_CommitSig.Marshal(b, m, deterministic) } func (m *CommitSig) XXX_Merge(src proto.Message) { xxx_messageInfo_CommitSig.Merge(m, src) } func (m *CommitSig) XXX_Size() int { - return m.Size() + return xxx_messageInfo_CommitSig.Size(m) } func (m *CommitSig) XXX_DiscardUnknown() { xxx_messageInfo_CommitSig.DiscardUnknown(m) @@ -656,40 +616,35 @@ func (m *CommitSig) GetSignature() []byte { } type Proposal struct { - Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` - PolRound int32 `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"` - BlockID BlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id"` - Timestamp time.Time `protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp"` - Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *Proposal) Reset() { *m = Proposal{} } -func (*Proposal) ProtoMessage() {} + Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"` + Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` + PolRound int32 `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"` + BlockID BlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id"` + Timestamp time.Time `protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Proposal) Reset() { *m = Proposal{} } +func (m *Proposal) String() string { return proto.CompactTextString(m) } +func (*Proposal) ProtoMessage() {} func (*Proposal) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{7} } func (m *Proposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Proposal.Unmarshal(m, b) } func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proposal.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_Proposal.Marshal(b, m, deterministic) } func (m *Proposal) XXX_Merge(src proto.Message) { xxx_messageInfo_Proposal.Merge(m, src) } func (m *Proposal) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Proposal.Size(m) } func (m *Proposal) XXX_DiscardUnknown() { xxx_messageInfo_Proposal.DiscardUnknown(m) @@ -747,35 +702,30 @@ func (m *Proposal) GetSignature() []byte { } type SignedHeader struct { - Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Commit *Commit `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"` + Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Commit *Commit `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *SignedHeader) Reset() { *m = SignedHeader{} } -func (*SignedHeader) ProtoMessage() {} +func (m *SignedHeader) Reset() { *m = SignedHeader{} } +func (m *SignedHeader) String() string { return proto.CompactTextString(m) } +func (*SignedHeader) ProtoMessage() {} func (*SignedHeader) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{8} } func (m *SignedHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_SignedHeader.Unmarshal(m, b) } func (m *SignedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedHeader.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_SignedHeader.Marshal(b, m, deterministic) } func (m *SignedHeader) XXX_Merge(src proto.Message) { xxx_messageInfo_SignedHeader.Merge(m, src) } func (m *SignedHeader) XXX_Size() int { - return m.Size() + return xxx_messageInfo_SignedHeader.Size(m) } func (m *SignedHeader) XXX_DiscardUnknown() { xxx_messageInfo_SignedHeader.DiscardUnknown(m) @@ -814,99 +764,82 @@ func init() { func init() { proto.RegisterFile("proto/types/types.proto", fileDescriptor_ff06f8095857fb18) } var fileDescriptor_ff06f8095857fb18 = []byte{ - // 1210 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x16, 0xf5, 0x63, 0x49, 0x43, 0x49, 0x96, 0x59, 0x37, 0x51, 0xe5, 0x82, 0x52, 0xec, 0x26, - 0x55, 0xd2, 0x40, 0x2a, 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23, 0x97, 0x47, 0xf7, 0xf8, 0x04, 0x4d, 0x51, 0x5a, 0x45, 0x92, 0xc7, 0x77, 0xe3, 0x2d, 0x37, - 0xcf, 0xfc, 0x79, 0x89, 0xdf, 0x47, 0x0e, 0xf1, 0x8c, 0x12, 0xaf, 0x07, 0x1b, 0x45, 0xa8, 0x40, - 0x9e, 0x66, 0x1e, 0x9b, 0xd3, 0xa9, 0x46, 0x64, 0xda, 0x9d, 0x35, 0xda, 0x9d, 0x9c, 0x6b, 0x6f, - 0x52, 0xf3, 0x6d, 0xb7, 0x4f, 0x5b, 0x90, 0x56, 0x10, 0x41, 0x0c, 0x92, 0xa4, 0x90, 0x94, 0x6b, - 0xa0, 0xce, 0xf7, 0x61, 0xfd, 0x10, 0xe9, 0x9a, 0x82, 0x88, 0x69, 0x3b, 0x0c, 0x92, 0x62, 0x59, - 0x16, 0x66, 0x0a, 0xfc, 0x10, 0x36, 0x0d, 0x7c, 0x9f, 0xc8, 0x67, 0xd1, 0x69, 0x8a, 0x16, 0x5c, - 0xdf, 0xdd, 0xe5, 0x88, 0xab, 0x90, 0x1b, 0xfb, 0x1d, 0x61, 0x58, 0xa0, 0xd8, 0x6c, 0x60, 0xa5, - 0xb0, 0x77, 0x20, 0x85, 0x2c, 0x8b, 0x01, 0x78, 0x0a, 0x48, 0x22, 0xcb, 0xa2, 0xae, 0x1b, 0xb0, - 0x41, 0xef, 0x68, 0x63, 0x67, 0xa6, 0x13, 0x2f, 0x49, 0x86, 0x62, 0xd6, 0x5d, 0x87, 0xc4, 0xec, - 0x14, 0xbb, 0x03, 0x59, 0x7c, 0xa8, 0x29, 0xd8, 0x18, 0x63, 0x86, 0xcb, 0x52, 0x5c, 0xc6, 0x37, - 0x52, 0xd0, 0x75, 0xc8, 0x5b, 0xb6, 0x69, 0x99, 0x0e, 0xb6, 0x65, 0xa4, 0x28, 0x36, 0x76, 0x9c, - 0x42, 0x8e, 0xe5, 0xf3, 0xed, 0x75, 0x66, 0x0e, 0xa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5c, - 0x85, 0x42, 0x03, 0x65, 0x25, 0x42, 0xdf, 0xdb, 0x3a, 0xa4, 0x47, 0x1a, 0x91, 0x91, 0x6d, 0xa3, - 0x23, 0x4a, 0x27, 0xbf, 0xfb, 0xde, 0xf9, 0xdc, 0xee, 0x63, 0x51, 0x75, 0x1f, 0x8b, 0x6a, 0x43, - 0x23, 0x75, 0x17, 0x2b, 0xa5, 0x46, 0xde, 0x6a, 0xfb, 0x94, 0x83, 0x74, 0x70, 0xac, 0xb0, 0x07, - 0x59, 0xff, 0xea, 0xf2, 0x3d, 0x1d, 0xa9, 0x9e, 0x54, 0x77, 0xfe, 0xe1, 0xfe, 0xb7, 0x74, 0xa4, - 0x4a, 0xbc, 0x77, 0x65, 0x77, 0x73, 0x71, 0xc3, 0xa3, 0x2b, 0x1a, 0xbe, 0xa4, 0xb0, 0xd8, 0xbf, - 0x53, 0xd8, 0x92, 0x16, 0xe2, 0x67, 0xb5, 0xf0, 0x6b, 0x14, 0x52, 0x7d, 0x3a, 0xce, 0x48, 0xff, - 0xff, 0xc6, 0x70, 0x0b, 0xd2, 0x96, 0xa9, 0xcb, 0xcc, 0x13, 0xa7, 0x9e, 0x94, 0x65, 0xea, 0xd2, - 0x39, 0x95, 0x25, 0xde, 0xe8, 0x8c, 0xae, 0xbd, 0x01, 0x06, 0x93, 0x67, 0x19, 0xfc, 0x0e, 0x32, - 0x8c, 0x10, 0xef, 0x15, 0xfe, 0xd8, 0x65, 0x82, 0x3e, 0xf2, 0xec, 0x11, 0x16, 0x57, 0x15, 0xcf, - 0xf0, 0x92, 0x87, 0x76, 0xe3, 0xd8, 0xfb, 0xe4, 0xfd, 0x38, 0x10, 0xff, 0x7e, 0x16, 0x24, 0x0f, - 0x7d, 0xe3, 0x37, 0x0e, 0xf8, 0x90, 0xda, 0x84, 0x22, 0x5c, 0x6a, 0xec, 0xf7, 0x9a, 0x77, 0x5a, - 0x72, 0xa7, 0x25, 0xdf, 0xda, 0xaf, 0xef, 0xc9,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, 0xd5, 0x0b, 0x91, - 0xfb, 0x7e, 0x2e, 0x72, 0x8f, 0xe7, 0x22, 0xf7, 0x64, 0x2e, 0x72, 0x4f, 0xe7, 0x22, 0xf7, 0xc7, - 0x5c, 0xe4, 0x5e, 0xce, 0xc5, 0xc8, 0xab, 0xb9, 0xc8, 0x3d, 0x38, 0x15, 0x23, 0x4f, 0x4f, 0xc5, - 0xc8, 0xb3, 0x53, 0x31, 0xf2, 0xf5, 0x4d, 0x55, 0x23, 0x93, 0xd9, 0xa8, 0x3a, 0x36, 0xa7, 0xb5, - 0x45, 0x4b, 0xc3, 0xcb, 0xd0, 0x8f, 0xe6, 0xd1, 0x1a, 0xdd, 0x7c, 0xf4, 0x57, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x97, 0x45, 0xd6, 0x5a, 0x4a, 0x0b, 0x00, 0x00, + // 1154 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xdd, 0x6e, 0xe3, 0xc4, + 0x17, 0xaf, 0xf3, 0x9d, 0xe3, 0x24, 0x4d, 0xfd, 0xef, 0x7f, 0x37, 0xa4, 0xa8, 0xc9, 0xb6, 0x74, + 0xc9, 0x96, 0x95, 0x83, 0x8a, 0x84, 0x80, 0xbb, 0x7c, 0x6d, 0x37, 0x6a, 0x9b, 0x44, 0x4e, 0x28, + 0x1f, 0x37, 0xd6, 0x24, 0x9e, 0x75, 0x2c, 0x1c, 0xdb, 0xb2, 0x27, 0xa5, 0xbd, 0xe1, 0x1a, 0x95, + 0x1b, 0x5e, 0xa0, 0xd2, 0x4a, 0x0b, 0x12, 0x8f, 0xc0, 0x1d, 0x5c, 0xf2, 0x14, 0x45, 0x5a, 0x6e, + 0x78, 0x00, 0x1e, 0x00, 0x79, 0x66, 0xec, 0x38, 0x6d, 0x03, 0x2b, 0x58, 0x71, 0xd3, 0xce, 0x9c, + 0xf3, 0x3b, 0x67, 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 0x0c, 0x99, 0x86, 0x86, 0x88, 0xed, 0x7a, 0x0c, 0x92, 0x61, 0x59, 0x16, 0x66, 0x0a, 0x7c, 0x17, + 0x36, 0x2d, 0x7c, 0x4e, 0xd4, 0x9b, 0xe8, 0x2c, 0x45, 0x4b, 0xbe, 0xef, 0x74, 0x39, 0x62, 0x0f, + 0x0a, 0x93, 0xa0, 0x23, 0x0c, 0x0b, 0x14, 0x9b, 0x0f, 0xad, 0x14, 0xf6, 0x06, 0x64, 0x90, 0xe3, + 0x30, 0x80, 0x48, 0x01, 0x69, 0xe4, 0x38, 0xd4, 0xb5, 0x0f, 0x1b, 0xf4, 0x8e, 0x2e, 0xf6, 0xe6, + 0x26, 0xe1, 0x49, 0x72, 0x14, 0xb3, 0xee, 0x3b, 0x14, 0x66, 0xa7, 0xd8, 0x5d, 0xc8, 0xe3, 0x33, + 0x43, 0xc3, 0xd6, 0x04, 0x33, 0x5c, 0x9e, 0xe2, 0x72, 0x81, 0x91, 0x82, 0x1e, 0x41, 0xd1, 0x71, + 0x6d, 0xc7, 0xf6, 0xb0, 0xab, 0x22, 0x4d, 0x73, 0xb1, 0xe7, 0x95, 0x0a, 0x2c, 0x5f, 0x60, 0x6f, + 0x30, 0x73, 0x44, 0x8d, 0x8f, 0x21, 0xd1, 0x46, 0x04, 0x49, 0x45, 0x88, 0x93, 0x73, 0xaf, 0x24, + 0x54, 0xe3, 0xb5, 0x9c, 0xe2, 0x2f, 0xef, 0x1a, 0x9f, 0x9d, 0x3f, 0x62, 0x90, 0x38, 0xb5, 0x09, + 0x96, 0x3e, 0x84, 0x84, 0xdf, 0x53, 0x2a, 0xdb, 0xc2, 0xea, 0xb1, 0x18, 0x1a, 0xba, 0x85, 0xb5, + 0x13, 0x4f, 0x1f, 0x5d, 0x38, 0x58, 0xa1, 0x21, 0x11, 0x1d, 0xc6, 0x96, 0x74, 0xb8, 0x09, 0x49, + 0xd7, 0x9e, 0x5b, 0x1a, 0x95, 0x67, 0x52, 0x61, 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86, 0x59, 0xce, 0x7c, 0xfd, 0x62, 0x7b, 0xed, 0x87, 0xef, 0xb6, 0xd7, 0xf6, 0xbf, + 0x17, 0x20, 0xbf, 0x24, 0x2a, 0x69, 0x0b, 0xee, 0x0f, 0xbb, 0x87, 0xbd, 0x4e, 0x5b, 0x3d, 0x19, + 0x1e, 0xaa, 0xa3, 0xcf, 0x06, 0x9d, 0xc8, 0x2d, 0x1e, 0x40, 0x6e, 0xa0, 0x74, 0x4e, 0xfb, 0xa3, + 0x0e, 0xf5, 0x14, 0x85, 0xf2, 0xfa, 0xe5, 0x55, 0x55, 0x1c, 0xb8, 0xf8, 0xcc, 0x26, 0x98, 0xc6, + 0xef, 0x41, 0x61, 0xa0, 0x74, 0x58, 0xb1, 0x0c, 0x14, 0x2b, 0x6f, 0x5c, 0x5e, 0x55, 0xf3, 0x03, + 0x17, 0x33, 0xde, 0x28, 0x6c, 0x17, 0xf2, 0x03, 0xa5, 0x3f, 0xe8, 0x0f, 0x1b, 0xc7, 0x0c, 0x15, + 0x2f, 0x17, 0x2f, 0xaf, 0xaa, 0xb9, 0x60, 0x22, 0x7c, 0xd0, 0xa2, 0xce, 0xa6, 0xfc, 0xf9, 0x63, + 0xdd, 0x20, 0xd3, 0xf9, 0x58, 0x9e, 0xd8, 0xb3, 0xfa, 0xa2, 0x3d, 0xd1, 0x65, 0xe4, 0x07, 0xf0, + 0x38, 0x45, 0x37, 0xef, 0xfd, 0x19, 0x00, 0x00, 0xff, 0xff, 0x58, 0xa5, 0x4c, 0x86, 0x16, 0x0b, + 0x00, 0x00, } -func (x BlockIDFlag) String() string { - s, ok := BlockIDFlag_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x SignedMsgType) String() string { - s, ok := SignedMsgType_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} func (this *PartSetHeader) Equal(that interface{}) bool { if that == nil { return this == nil @@ -932,6 +865,9 @@ func (this *PartSetHeader) Equal(that interface{}) bool { if !bytes.Equal(this.Hash, that1.Hash) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *BlockID) Equal(that interface{}) bool { @@ -959,6 +895,9 @@ func (this *BlockID) Equal(that interface{}) bool { if !this.PartsHeader.Equal(&that1.PartsHeader) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *Header) Equal(that interface{}) bool { @@ -1022,3448 +961,173 @@ func (this *Header) Equal(that interface{}) bool { if !bytes.Equal(this.ProposerAddress, that1.ProposerAddress) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } -func (this *Data) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Data) - if !ok { - that2, ok := that.(Data) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false +func NewPopulatedPartSetHeader(r randyTypes, easy bool) *PartSetHeader { + this := &PartSetHeader{} + this.Total = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Hash = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Hash[i] = byte(r.Intn(256)) } - if len(this.Txs) != len(that1.Txs) { - return false + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) } - for i := range this.Txs { - if !bytes.Equal(this.Txs[i], that1.Txs[i]) { - return false - } + return this +} + +func NewPopulatedBlockID(r randyTypes, easy bool) *BlockID { + this := &BlockID{} + v2 := r.Intn(100) + this.Hash = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Hash[i] = byte(r.Intn(256)) } - if !bytes.Equal(this.Hash, that1.Hash) { - return false + v3 := NewPopulatedPartSetHeader(r, easy) + this.PartsHeader = *v3 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) } - return true + return this } -func (this *Vote) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*Vote) - if !ok { - that2, ok := that.(Vote) - if ok { - that1 = &that2 - } else { - return false - } +func NewPopulatedHeader(r randyTypes, easy bool) *Header { + this := &Header{} + v4 := version.NewPopulatedConsensus(r, easy) + this.Version = *v4 + this.ChainID = string(randStringTypes(r)) + this.Height = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Height *= -1 } - if that1 == nil { - return this == nil - } else if this == nil { - return false + v5 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Time = *v5 + v6 := NewPopulatedBlockID(r, easy) + this.LastBlockID = *v6 + v7 := r.Intn(100) + this.LastCommitHash = make([]byte, v7) + for i := 0; i < v7; i++ { + this.LastCommitHash[i] = byte(r.Intn(256)) } - if this.Type != that1.Type { - return false + v8 := r.Intn(100) + this.DataHash = make([]byte, v8) + for i := 0; i < v8; i++ { + this.DataHash[i] = byte(r.Intn(256)) } - if this.Height != that1.Height { - return false + v9 := r.Intn(100) + this.ValidatorsHash = make([]byte, v9) + for i := 0; i < v9; i++ { + this.ValidatorsHash[i] = byte(r.Intn(256)) } - if this.Round != that1.Round { - return false + v10 := r.Intn(100) + this.NextValidatorsHash = make([]byte, v10) + for i := 0; i < v10; i++ { + this.NextValidatorsHash[i] = byte(r.Intn(256)) } - if !this.BlockID.Equal(&that1.BlockID) { - return false + v11 := r.Intn(100) + this.ConsensusHash = make([]byte, v11) + for i := 0; i < v11; i++ { + this.ConsensusHash[i] = byte(r.Intn(256)) } - if !this.Timestamp.Equal(that1.Timestamp) { - return false + v12 := r.Intn(100) + this.AppHash = make([]byte, v12) + for i := 0; i < v12; i++ { + this.AppHash[i] = byte(r.Intn(256)) } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false + v13 := r.Intn(100) + this.LastResultsHash = make([]byte, v13) + for i := 0; i < v13; i++ { + this.LastResultsHash[i] = byte(r.Intn(256)) } - if this.ValidatorIndex != that1.ValidatorIndex { - return false + v14 := r.Intn(100) + this.EvidenceHash = make([]byte, v14) + for i := 0; i < v14; i++ { + this.EvidenceHash[i] = byte(r.Intn(256)) } - if !bytes.Equal(this.Signature, that1.Signature) { - return false + v15 := r.Intn(100) + this.ProposerAddress = make([]byte, v15) + for i := 0; i < v15; i++ { + this.ProposerAddress[i] = byte(r.Intn(256)) } - return true -} -func (this *Commit) Equal(that interface{}) bool { - if that == nil { - return this == nil + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 15) } + return this +} - that1, ok := that.(*Commit) - if !ok { - that2, ok := that.(Commit) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Height != that1.Height { - return false - } - if this.Round != that1.Round { - return false - } - if !this.BlockID.Equal(&that1.BlockID) { - return false +type randyTypes interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypes(r randyTypes) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) } - if len(this.Signatures) != len(that1.Signatures) { - return false + return rune(ru + 61) +} +func randStringTypes(r randyTypes) string { + v16 := r.Intn(100) + tmps := make([]rune, v16) + for i := 0; i < v16; i++ { + tmps[i] = randUTF8RuneTypes(r) } - for i := range this.Signatures { - if !this.Signatures[i].Equal(&that1.Signatures[i]) { - return false + return string(tmps) +} +func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypes(dAtA, r, fieldNumber, wire) } - if !bytes.Equal(this.Hash, that1.Hash) { - return false - } - if !this.BitArray.Equal(that1.BitArray) { - return false - } - return true + return dAtA } -func (this *CommitSig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CommitSig) - if !ok { - that2, ok := that.(CommitSig) - if ok { - that1 = &that2 - } else { - return false +func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + v17 := r.Int63() + if r.Intn(2) == 0 { + v17 *= -1 + } + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v17)) + case 1: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) } + default: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.BlockIdFlag != that1.BlockIdFlag { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if !this.Timestamp.Equal(that1.Timestamp) { - return false - } - if !bytes.Equal(this.Signature, that1.Signature) { - return false - } - return true -} -func (this *Proposal) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Proposal) - if !ok { - that2, ok := that.(Proposal) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Type != that1.Type { - return false - } - if this.Height != that1.Height { - return false - } - if this.Round != that1.Round { - return false - } - if this.PolRound != that1.PolRound { - return false - } - if !this.BlockID.Equal(&that1.BlockID) { - return false - } - if !this.Timestamp.Equal(that1.Timestamp) { - return false - } - if !bytes.Equal(this.Signature, that1.Signature) { - return false - } - return true -} -func (this *SignedHeader) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SignedHeader) - if !ok { - that2, ok := that.(SignedHeader) - 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.Commit.Equal(that1.Commit) { - return false - } - return true -} -func (this *PartSetHeader) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.PartSetHeader{") - s = append(s, "Total: "+fmt.Sprintf("%#v", this.Total)+",\n") - s = append(s, "Hash: "+fmt.Sprintf("%#v", this.Hash)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *BlockID) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.BlockID{") - s = append(s, "Hash: "+fmt.Sprintf("%#v", this.Hash)+",\n") - s = append(s, "PartsHeader: "+strings.Replace(this.PartsHeader.GoString(), `&`, ``, 1)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Header) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 18) - s = append(s, "&types.Header{") - s = append(s, "Version: "+strings.Replace(this.Version.GoString(), `&`, ``, 1)+",\n") - s = append(s, "ChainID: "+fmt.Sprintf("%#v", this.ChainID)+",\n") - s = append(s, "Height: "+fmt.Sprintf("%#v", this.Height)+",\n") - s = append(s, "Time: "+fmt.Sprintf("%#v", this.Time)+",\n") - s = append(s, "LastBlockID: "+strings.Replace(this.LastBlockID.GoString(), `&`, ``, 1)+",\n") - s = append(s, "LastCommitHash: "+fmt.Sprintf("%#v", this.LastCommitHash)+",\n") - s = append(s, "DataHash: "+fmt.Sprintf("%#v", this.DataHash)+",\n") - s = append(s, "ValidatorsHash: "+fmt.Sprintf("%#v", this.ValidatorsHash)+",\n") - s = append(s, "NextValidatorsHash: "+fmt.Sprintf("%#v", this.NextValidatorsHash)+",\n") - s = append(s, "ConsensusHash: "+fmt.Sprintf("%#v", this.ConsensusHash)+",\n") - s = append(s, "AppHash: "+fmt.Sprintf("%#v", this.AppHash)+",\n") - s = append(s, "LastResultsHash: "+fmt.Sprintf("%#v", this.LastResultsHash)+",\n") - s = append(s, "EvidenceHash: "+fmt.Sprintf("%#v", this.EvidenceHash)+",\n") - s = append(s, "ProposerAddress: "+fmt.Sprintf("%#v", this.ProposerAddress)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Data) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.Data{") - s = append(s, "Txs: "+fmt.Sprintf("%#v", this.Txs)+",\n") - s = append(s, "Hash: "+fmt.Sprintf("%#v", this.Hash)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Vote) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 12) - s = append(s, "&types.Vote{") - s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") - s = append(s, "Height: "+fmt.Sprintf("%#v", this.Height)+",\n") - s = append(s, "Round: "+fmt.Sprintf("%#v", this.Round)+",\n") - s = append(s, "BlockID: "+strings.Replace(this.BlockID.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Timestamp: "+fmt.Sprintf("%#v", this.Timestamp)+",\n") - s = append(s, "ValidatorAddress: "+fmt.Sprintf("%#v", this.ValidatorAddress)+",\n") - s = append(s, "ValidatorIndex: "+fmt.Sprintf("%#v", this.ValidatorIndex)+",\n") - s = append(s, "Signature: "+fmt.Sprintf("%#v", this.Signature)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Commit) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&types.Commit{") - s = append(s, "Height: "+fmt.Sprintf("%#v", this.Height)+",\n") - s = append(s, "Round: "+fmt.Sprintf("%#v", this.Round)+",\n") - s = append(s, "BlockID: "+strings.Replace(this.BlockID.GoString(), `&`, ``, 1)+",\n") - if this.Signatures != nil { - vs := make([]CommitSig, len(this.Signatures)) - for i := range vs { - vs[i] = this.Signatures[i] - } - s = append(s, "Signatures: "+fmt.Sprintf("%#v", vs)+",\n") - } - s = append(s, "Hash: "+fmt.Sprintf("%#v", this.Hash)+",\n") - if this.BitArray != nil { - s = append(s, "BitArray: "+fmt.Sprintf("%#v", this.BitArray)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CommitSig) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&types.CommitSig{") - s = append(s, "BlockIdFlag: "+fmt.Sprintf("%#v", this.BlockIdFlag)+",\n") - s = append(s, "ValidatorAddress: "+fmt.Sprintf("%#v", this.ValidatorAddress)+",\n") - s = append(s, "Timestamp: "+fmt.Sprintf("%#v", this.Timestamp)+",\n") - s = append(s, "Signature: "+fmt.Sprintf("%#v", this.Signature)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Proposal) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 11) - s = append(s, "&types.Proposal{") - s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") - s = append(s, "Height: "+fmt.Sprintf("%#v", this.Height)+",\n") - s = append(s, "Round: "+fmt.Sprintf("%#v", this.Round)+",\n") - s = append(s, "PolRound: "+fmt.Sprintf("%#v", this.PolRound)+",\n") - s = append(s, "BlockID: "+strings.Replace(this.BlockID.GoString(), `&`, ``, 1)+",\n") - s = append(s, "Timestamp: "+fmt.Sprintf("%#v", this.Timestamp)+",\n") - s = append(s, "Signature: "+fmt.Sprintf("%#v", this.Signature)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SignedHeader) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.SignedHeader{") - if this.Header != nil { - s = append(s, "Header: "+fmt.Sprintf("%#v", this.Header)+",\n") - } - if this.Commit != nil { - s = append(s, "Commit: "+fmt.Sprintf("%#v", this.Commit)+",\n") - } - s = append(s, "}") - return strings.Join(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 *PartSetHeader) 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 *PartSetHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PartSetHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x12 - } - if m.Total != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Total)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BlockID) 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 *BlockID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.PartsHeader.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Header) 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 *Header) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProposerAddress) > 0 { - i -= len(m.ProposerAddress) - copy(dAtA[i:], m.ProposerAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) - i-- - dAtA[i] = 0x72 - } - if len(m.EvidenceHash) > 0 { - i -= len(m.EvidenceHash) - copy(dAtA[i:], m.EvidenceHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) - i-- - dAtA[i] = 0x6a - } - if len(m.LastResultsHash) > 0 { - i -= len(m.LastResultsHash) - copy(dAtA[i:], m.LastResultsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) - i-- - dAtA[i] = 0x62 - } - if len(m.AppHash) > 0 { - i -= len(m.AppHash) - copy(dAtA[i:], m.AppHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) - i-- - dAtA[i] = 0x5a - } - if len(m.ConsensusHash) > 0 { - i -= len(m.ConsensusHash) - copy(dAtA[i:], m.ConsensusHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) - i-- - dAtA[i] = 0x52 - } - if len(m.NextValidatorsHash) > 0 { - i -= len(m.NextValidatorsHash) - copy(dAtA[i:], m.NextValidatorsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) - i-- - dAtA[i] = 0x4a - } - if len(m.ValidatorsHash) > 0 { - i -= len(m.ValidatorsHash) - copy(dAtA[i:], m.ValidatorsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) - i-- - dAtA[i] = 0x42 - } - if len(m.DataHash) > 0 { - i -= len(m.DataHash) - copy(dAtA[i:], m.DataHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) - i-- - dAtA[i] = 0x3a - } - if len(m.LastCommitHash) > 0 { - i -= len(m.LastCommitHash) - copy(dAtA[i:], m.LastCommitHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) - i-- - dAtA[i] = 0x32 - } - { - size, err := m.LastBlockID.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintTypes(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x22 - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x18 - } - if len(m.ChainID) > 0 { - i -= len(m.ChainID) - copy(dAtA[i:], m.ChainID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Data) 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 *Data) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Data) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x12 - } - if len(m.Txs) > 0 { - for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Txs[iNdEx]) - copy(dAtA[i:], m.Txs[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Vote) 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 *Vote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x42 - } - if m.ValidatorIndex != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.ValidatorIndex)) - i-- - dAtA[i] = 0x38 - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x32 - } - n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintTypes(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x2a - { - size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x18 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if m.Type != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Commit) 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 *Commit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BitArray != nil { - { - size, err := m.BitArray.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x2a - } - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - { - size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CommitSig) 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 *CommitSig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitSig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } - n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err9 != nil { - return 0, err9 - } - i -= n9 - i = encodeVarintTypes(dAtA, i, uint64(n9)) - i-- - dAtA[i] = 0x1a - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if m.BlockIdFlag != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.BlockIdFlag)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Proposal) 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 *Proposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x3a - } - n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err10 != nil { - return 0, err10 - } - i -= n10 - i = encodeVarintTypes(dAtA, i, uint64(n10)) - i-- - dAtA[i] = 0x32 - { - size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if m.PolRound != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.PolRound)) - i-- - dAtA[i] = 0x20 - } - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x18 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if m.Type != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SignedHeader) 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 *SignedHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Commit != nil { - { - size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - 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 NewPopulatedPartSetHeader(r randyTypes, easy bool) *PartSetHeader { - this := &PartSetHeader{} - this.Total = uint32(r.Uint32()) - v1 := r.Intn(100) - this.Hash = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Hash[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedBlockID(r randyTypes, easy bool) *BlockID { - this := &BlockID{} - v2 := r.Intn(100) - this.Hash = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Hash[i] = byte(r.Intn(256)) - } - v3 := NewPopulatedPartSetHeader(r, easy) - this.PartsHeader = *v3 - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedHeader(r randyTypes, easy bool) *Header { - this := &Header{} - v4 := version.NewPopulatedConsensus(r, easy) - this.Version = *v4 - this.ChainID = string(randStringTypes(r)) - this.Height = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Height *= -1 - } - v5 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) - this.Time = *v5 - v6 := NewPopulatedBlockID(r, easy) - this.LastBlockID = *v6 - v7 := r.Intn(100) - this.LastCommitHash = make([]byte, v7) - for i := 0; i < v7; i++ { - this.LastCommitHash[i] = byte(r.Intn(256)) - } - v8 := r.Intn(100) - this.DataHash = make([]byte, v8) - for i := 0; i < v8; i++ { - this.DataHash[i] = byte(r.Intn(256)) - } - v9 := r.Intn(100) - this.ValidatorsHash = make([]byte, v9) - for i := 0; i < v9; i++ { - this.ValidatorsHash[i] = byte(r.Intn(256)) - } - v10 := r.Intn(100) - this.NextValidatorsHash = make([]byte, v10) - for i := 0; i < v10; i++ { - this.NextValidatorsHash[i] = byte(r.Intn(256)) - } - v11 := r.Intn(100) - this.ConsensusHash = make([]byte, v11) - for i := 0; i < v11; i++ { - this.ConsensusHash[i] = byte(r.Intn(256)) - } - v12 := r.Intn(100) - this.AppHash = make([]byte, v12) - for i := 0; i < v12; i++ { - this.AppHash[i] = byte(r.Intn(256)) - } - v13 := r.Intn(100) - this.LastResultsHash = make([]byte, v13) - for i := 0; i < v13; i++ { - this.LastResultsHash[i] = byte(r.Intn(256)) - } - v14 := r.Intn(100) - this.EvidenceHash = make([]byte, v14) - for i := 0; i < v14; i++ { - this.EvidenceHash[i] = byte(r.Intn(256)) - } - v15 := r.Intn(100) - this.ProposerAddress = make([]byte, v15) - for i := 0; i < v15; i++ { - this.ProposerAddress[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyTypes interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTypes(r randyTypes) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTypes(r randyTypes) string { - v16 := r.Intn(100) - tmps := make([]rune, v16) - for i := 0; i < v16; i++ { - tmps[i] = randUTF8RuneTypes(r) - } - return string(tmps) -} -func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldTypes(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - v17 := r.Int63() - if r.Intn(2) == 0 { - v17 *= -1 - } - dAtA = encodeVarintPopulateTypes(dAtA, uint64(v17)) - case 1: - dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 + return dAtA +} +func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 } dAtA = append(dAtA, uint8(v)) return dAtA } -func (m *PartSetHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Total != 0 { - n += 1 + sovTypes(uint64(m.Total)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *BlockID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = m.PartsHeader.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *Header) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Version.Size() - n += 1 + l + sovTypes(uint64(l)) - l = len(m.ChainID) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) - n += 1 + l + sovTypes(uint64(l)) - l = m.LastBlockID.Size() - n += 1 + l + sovTypes(uint64(l)) - l = len(m.LastCommitHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.DataHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ValidatorsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.NextValidatorsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ConsensusHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.AppHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.LastResultsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.EvidenceHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ProposerAddress) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Data) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Txs) > 0 { - for _, b := range m.Txs { - l = len(b) - n += 1 + l + sovTypes(uint64(l)) - } - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Vote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovTypes(uint64(m.Type)) - } - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - l = m.BlockID.Size() - n += 1 + l + sovTypes(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.ValidatorIndex != 0 { - n += 1 + sovTypes(uint64(m.ValidatorIndex)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Commit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - l = m.BlockID.Size() - n += 1 + l + sovTypes(uint64(l)) - if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.BitArray != nil { - l = m.BitArray.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *CommitSig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockIdFlag != 0 { - n += 1 + sovTypes(uint64(m.BlockIdFlag)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Proposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovTypes(uint64(m.Type)) - } - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - if m.PolRound != 0 { - n += 1 + sovTypes(uint64(m.PolRound)) - } - l = m.BlockID.Size() - n += 1 + l + sovTypes(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *SignedHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Commit != nil { - l = m.Commit.Size() - 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 *PartSetHeader) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PartSetHeader{`, - `Total:` + fmt.Sprintf("%v", this.Total) + `,`, - `Hash:` + fmt.Sprintf("%v", this.Hash) + `,`, - `}`, - }, "") - return s -} -func (this *BlockID) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BlockID{`, - `Hash:` + fmt.Sprintf("%v", this.Hash) + `,`, - `PartsHeader:` + strings.Replace(strings.Replace(this.PartsHeader.String(), "PartSetHeader", "PartSetHeader", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *Header) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Header{`, - `Version:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Version), "Consensus", "version.Consensus", 1), `&`, ``, 1) + `,`, - `ChainID:` + fmt.Sprintf("%v", this.ChainID) + `,`, - `Height:` + fmt.Sprintf("%v", this.Height) + `,`, - `Time:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Time), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`, - `LastBlockID:` + strings.Replace(strings.Replace(this.LastBlockID.String(), "BlockID", "BlockID", 1), `&`, ``, 1) + `,`, - `LastCommitHash:` + fmt.Sprintf("%v", this.LastCommitHash) + `,`, - `DataHash:` + fmt.Sprintf("%v", this.DataHash) + `,`, - `ValidatorsHash:` + fmt.Sprintf("%v", this.ValidatorsHash) + `,`, - `NextValidatorsHash:` + fmt.Sprintf("%v", this.NextValidatorsHash) + `,`, - `ConsensusHash:` + fmt.Sprintf("%v", this.ConsensusHash) + `,`, - `AppHash:` + fmt.Sprintf("%v", this.AppHash) + `,`, - `LastResultsHash:` + fmt.Sprintf("%v", this.LastResultsHash) + `,`, - `EvidenceHash:` + fmt.Sprintf("%v", this.EvidenceHash) + `,`, - `ProposerAddress:` + fmt.Sprintf("%v", this.ProposerAddress) + `,`, - `}`, - }, "") - return s -} -func (this *Data) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Data{`, - `Txs:` + fmt.Sprintf("%v", this.Txs) + `,`, - `Hash:` + fmt.Sprintf("%v", this.Hash) + `,`, - `}`, - }, "") - return s -} -func (this *Vote) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Vote{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Height:` + fmt.Sprintf("%v", this.Height) + `,`, - `Round:` + fmt.Sprintf("%v", this.Round) + `,`, - `BlockID:` + strings.Replace(strings.Replace(this.BlockID.String(), "BlockID", "BlockID", 1), `&`, ``, 1) + `,`, - `Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`, - `ValidatorAddress:` + fmt.Sprintf("%v", this.ValidatorAddress) + `,`, - `ValidatorIndex:` + fmt.Sprintf("%v", this.ValidatorIndex) + `,`, - `Signature:` + fmt.Sprintf("%v", this.Signature) + `,`, - `}`, - }, "") - return s -} -func (this *Commit) String() string { - if this == nil { - return "nil" - } - repeatedStringForSignatures := "[]CommitSig{" - for _, f := range this.Signatures { - repeatedStringForSignatures += strings.Replace(strings.Replace(f.String(), "CommitSig", "CommitSig", 1), `&`, ``, 1) + "," - } - repeatedStringForSignatures += "}" - s := strings.Join([]string{`&Commit{`, - `Height:` + fmt.Sprintf("%v", this.Height) + `,`, - `Round:` + fmt.Sprintf("%v", this.Round) + `,`, - `BlockID:` + strings.Replace(strings.Replace(this.BlockID.String(), "BlockID", "BlockID", 1), `&`, ``, 1) + `,`, - `Signatures:` + repeatedStringForSignatures + `,`, - `Hash:` + fmt.Sprintf("%v", this.Hash) + `,`, - `BitArray:` + strings.Replace(fmt.Sprintf("%v", this.BitArray), "BitArray", "bits.BitArray", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CommitSig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CommitSig{`, - `BlockIdFlag:` + fmt.Sprintf("%v", this.BlockIdFlag) + `,`, - `ValidatorAddress:` + fmt.Sprintf("%v", this.ValidatorAddress) + `,`, - `Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`, - `Signature:` + fmt.Sprintf("%v", this.Signature) + `,`, - `}`, - }, "") - return s -} -func (this *Proposal) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Proposal{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Height:` + fmt.Sprintf("%v", this.Height) + `,`, - `Round:` + fmt.Sprintf("%v", this.Round) + `,`, - `PolRound:` + fmt.Sprintf("%v", this.PolRound) + `,`, - `BlockID:` + strings.Replace(strings.Replace(this.BlockID.String(), "BlockID", "BlockID", 1), `&`, ``, 1) + `,`, - `Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`, - `Signature:` + fmt.Sprintf("%v", this.Signature) + `,`, - `}`, - }, "") - return s -} -func (this *SignedHeader) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SignedHeader{`, - `Header:` + strings.Replace(this.Header.String(), "Header", "Header", 1) + `,`, - `Commit:` + strings.Replace(this.Commit.String(), "Commit", "Commit", 1) + `,`, - `}`, - }, "") - 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 *PartSetHeader) 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: PartSetHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PartSetHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", 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 - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - 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 *BlockID) 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: BlockID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", 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 - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PartsHeader", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PartsHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *Header) 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: Header: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastBlockID", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastBlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", 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 - } - m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) - if m.LastCommitHash == nil { - m.LastCommitHash = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataHash", 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 - } - m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) - if m.DataHash == nil { - m.DataHash = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", 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 - } - m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorsHash == nil { - m.ValidatorsHash = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", 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 - } - m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) - if m.NextValidatorsHash == nil { - m.NextValidatorsHash = []byte{} - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", 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 - } - m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) - if m.ConsensusHash == nil { - m.ConsensusHash = []byte{} - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppHash", 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 - } - m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) - if m.AppHash == nil { - m.AppHash = []byte{} - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", 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 - } - m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) - if m.LastResultsHash == nil { - m.LastResultsHash = []byte{} - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", 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 - } - m.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) - if m.EvidenceHash == nil { - m.EvidenceHash = []byte{} - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", 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 - } - m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ProposerAddress == nil { - m.ProposerAddress = []byte{} - } - 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 *Data) 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: Data: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Txs", 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 - } - m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) - copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", 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 - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - 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 *Vote) 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: Vote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= SignedMsgType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", 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 - } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndex", wireType) - } - m.ValidatorIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidatorIndex |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", 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 - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - 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 *Commit) 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: Commit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Commit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signatures = append(m.Signatures, CommitSig{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", 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 - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BitArray", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BitArray == nil { - m.BitArray = &bits.BitArray{} - } - if err := m.BitArray.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *CommitSig) 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: CommitSig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitSig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockIdFlag", wireType) - } - m.BlockIdFlag = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockIdFlag |= BlockIDFlag(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", 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 - } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", 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 - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - 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 *Proposal) 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: Proposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= SignedMsgType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PolRound", wireType) - } - m.PolRound = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PolRound |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", 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 - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - 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 *SignedHeader) 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: SignedHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedHeader: 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 ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &Header{} - } - 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 Commit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Commit == nil { - m.Commit = &Commit{} - } - if err := m.Commit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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") -) diff --git a/proto/types/validator.pb.go b/proto/types/validator.pb.go index d13a43ede..802b4e570 100644 --- a/proto/types/validator.pb.go +++ b/proto/types/validator.pb.go @@ -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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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") -) diff --git a/proto/version/version.pb.go b/proto/version/version.pb.go index 4eeb7ccc4..0fa819463 100644 --- a/proto/version/version.pb.go +++ b/proto/version/version.pb.go @@ -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") -)