github.com/adoriasoft/tendermint@v0.34.0-dev1.0.20200722151356-96d84601a75a/proto/tendermint/types/canonical.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: tendermint/types/canonical.proto
     3  
     4  package types
     5  
     6  import (
     7  	encoding_binary "encoding/binary"
     8  	fmt "fmt"
     9  	_ "github.com/gogo/protobuf/gogoproto"
    10  	proto "github.com/gogo/protobuf/proto"
    11  	_ "github.com/gogo/protobuf/types"
    12  	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
    13  	io "io"
    14  	math "math"
    15  	math_bits "math/bits"
    16  	time "time"
    17  )
    18  
    19  // Reference imports to suppress errors if they are not otherwise used.
    20  var _ = proto.Marshal
    21  var _ = fmt.Errorf
    22  var _ = math.Inf
    23  var _ = time.Kitchen
    24  
    25  // This is a compile-time assertion to ensure that this generated file
    26  // is compatible with the proto package it is being compiled against.
    27  // A compilation error at this line likely means your copy of the
    28  // proto package needs to be updated.
    29  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    30  
    31  type CanonicalBlockID struct {
    32  	Hash          []byte                 `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
    33  	PartSetHeader CanonicalPartSetHeader `protobuf:"bytes,2,opt,name=part_set_header,json=partSetHeader,proto3" json:"part_set_header"`
    34  }
    35  
    36  func (m *CanonicalBlockID) Reset()         { *m = CanonicalBlockID{} }
    37  func (m *CanonicalBlockID) String() string { return proto.CompactTextString(m) }
    38  func (*CanonicalBlockID) ProtoMessage()    {}
    39  func (*CanonicalBlockID) Descriptor() ([]byte, []int) {
    40  	return fileDescriptor_8d1a1a84ff7267ed, []int{0}
    41  }
    42  func (m *CanonicalBlockID) XXX_Unmarshal(b []byte) error {
    43  	return m.Unmarshal(b)
    44  }
    45  func (m *CanonicalBlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    46  	if deterministic {
    47  		return xxx_messageInfo_CanonicalBlockID.Marshal(b, m, deterministic)
    48  	} else {
    49  		b = b[:cap(b)]
    50  		n, err := m.MarshalToSizedBuffer(b)
    51  		if err != nil {
    52  			return nil, err
    53  		}
    54  		return b[:n], nil
    55  	}
    56  }
    57  func (m *CanonicalBlockID) XXX_Merge(src proto.Message) {
    58  	xxx_messageInfo_CanonicalBlockID.Merge(m, src)
    59  }
    60  func (m *CanonicalBlockID) XXX_Size() int {
    61  	return m.Size()
    62  }
    63  func (m *CanonicalBlockID) XXX_DiscardUnknown() {
    64  	xxx_messageInfo_CanonicalBlockID.DiscardUnknown(m)
    65  }
    66  
    67  var xxx_messageInfo_CanonicalBlockID proto.InternalMessageInfo
    68  
    69  func (m *CanonicalBlockID) GetHash() []byte {
    70  	if m != nil {
    71  		return m.Hash
    72  	}
    73  	return nil
    74  }
    75  
    76  func (m *CanonicalBlockID) GetPartSetHeader() CanonicalPartSetHeader {
    77  	if m != nil {
    78  		return m.PartSetHeader
    79  	}
    80  	return CanonicalPartSetHeader{}
    81  }
    82  
    83  type CanonicalPartSetHeader struct {
    84  	Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
    85  	Hash  []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
    86  }
    87  
    88  func (m *CanonicalPartSetHeader) Reset()         { *m = CanonicalPartSetHeader{} }
    89  func (m *CanonicalPartSetHeader) String() string { return proto.CompactTextString(m) }
    90  func (*CanonicalPartSetHeader) ProtoMessage()    {}
    91  func (*CanonicalPartSetHeader) Descriptor() ([]byte, []int) {
    92  	return fileDescriptor_8d1a1a84ff7267ed, []int{1}
    93  }
    94  func (m *CanonicalPartSetHeader) XXX_Unmarshal(b []byte) error {
    95  	return m.Unmarshal(b)
    96  }
    97  func (m *CanonicalPartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    98  	if deterministic {
    99  		return xxx_messageInfo_CanonicalPartSetHeader.Marshal(b, m, deterministic)
   100  	} else {
   101  		b = b[:cap(b)]
   102  		n, err := m.MarshalToSizedBuffer(b)
   103  		if err != nil {
   104  			return nil, err
   105  		}
   106  		return b[:n], nil
   107  	}
   108  }
   109  func (m *CanonicalPartSetHeader) XXX_Merge(src proto.Message) {
   110  	xxx_messageInfo_CanonicalPartSetHeader.Merge(m, src)
   111  }
   112  func (m *CanonicalPartSetHeader) XXX_Size() int {
   113  	return m.Size()
   114  }
   115  func (m *CanonicalPartSetHeader) XXX_DiscardUnknown() {
   116  	xxx_messageInfo_CanonicalPartSetHeader.DiscardUnknown(m)
   117  }
   118  
   119  var xxx_messageInfo_CanonicalPartSetHeader proto.InternalMessageInfo
   120  
   121  func (m *CanonicalPartSetHeader) GetTotal() uint32 {
   122  	if m != nil {
   123  		return m.Total
   124  	}
   125  	return 0
   126  }
   127  
   128  func (m *CanonicalPartSetHeader) GetHash() []byte {
   129  	if m != nil {
   130  		return m.Hash
   131  	}
   132  	return nil
   133  }
   134  
   135  type CanonicalProposal struct {
   136  	Type      SignedMsgType     `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"`
   137  	Height    int64             `protobuf:"fixed64,2,opt,name=height,proto3" json:"height,omitempty"`
   138  	Round     int64             `protobuf:"fixed64,3,opt,name=round,proto3" json:"round,omitempty"`
   139  	POLRound  int64             `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"`
   140  	BlockID   *CanonicalBlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"`
   141  	Timestamp time.Time         `protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
   142  	ChainID   string            `protobuf:"bytes,7,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
   143  }
   144  
   145  func (m *CanonicalProposal) Reset()         { *m = CanonicalProposal{} }
   146  func (m *CanonicalProposal) String() string { return proto.CompactTextString(m) }
   147  func (*CanonicalProposal) ProtoMessage()    {}
   148  func (*CanonicalProposal) Descriptor() ([]byte, []int) {
   149  	return fileDescriptor_8d1a1a84ff7267ed, []int{2}
   150  }
   151  func (m *CanonicalProposal) XXX_Unmarshal(b []byte) error {
   152  	return m.Unmarshal(b)
   153  }
   154  func (m *CanonicalProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   155  	if deterministic {
   156  		return xxx_messageInfo_CanonicalProposal.Marshal(b, m, deterministic)
   157  	} else {
   158  		b = b[:cap(b)]
   159  		n, err := m.MarshalToSizedBuffer(b)
   160  		if err != nil {
   161  			return nil, err
   162  		}
   163  		return b[:n], nil
   164  	}
   165  }
   166  func (m *CanonicalProposal) XXX_Merge(src proto.Message) {
   167  	xxx_messageInfo_CanonicalProposal.Merge(m, src)
   168  }
   169  func (m *CanonicalProposal) XXX_Size() int {
   170  	return m.Size()
   171  }
   172  func (m *CanonicalProposal) XXX_DiscardUnknown() {
   173  	xxx_messageInfo_CanonicalProposal.DiscardUnknown(m)
   174  }
   175  
   176  var xxx_messageInfo_CanonicalProposal proto.InternalMessageInfo
   177  
   178  func (m *CanonicalProposal) GetType() SignedMsgType {
   179  	if m != nil {
   180  		return m.Type
   181  	}
   182  	return UnknownType
   183  }
   184  
   185  func (m *CanonicalProposal) GetHeight() int64 {
   186  	if m != nil {
   187  		return m.Height
   188  	}
   189  	return 0
   190  }
   191  
   192  func (m *CanonicalProposal) GetRound() int64 {
   193  	if m != nil {
   194  		return m.Round
   195  	}
   196  	return 0
   197  }
   198  
   199  func (m *CanonicalProposal) GetPOLRound() int64 {
   200  	if m != nil {
   201  		return m.POLRound
   202  	}
   203  	return 0
   204  }
   205  
   206  func (m *CanonicalProposal) GetBlockID() *CanonicalBlockID {
   207  	if m != nil {
   208  		return m.BlockID
   209  	}
   210  	return nil
   211  }
   212  
   213  func (m *CanonicalProposal) GetTimestamp() time.Time {
   214  	if m != nil {
   215  		return m.Timestamp
   216  	}
   217  	return time.Time{}
   218  }
   219  
   220  func (m *CanonicalProposal) GetChainID() string {
   221  	if m != nil {
   222  		return m.ChainID
   223  	}
   224  	return ""
   225  }
   226  
   227  type CanonicalVote struct {
   228  	Type      SignedMsgType     `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"`
   229  	Height    int64             `protobuf:"fixed64,2,opt,name=height,proto3" json:"height,omitempty"`
   230  	Round     int64             `protobuf:"fixed64,3,opt,name=round,proto3" json:"round,omitempty"`
   231  	BlockID   *CanonicalBlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"`
   232  	Timestamp time.Time         `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
   233  	ChainID   string            `protobuf:"bytes,6,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
   234  }
   235  
   236  func (m *CanonicalVote) Reset()         { *m = CanonicalVote{} }
   237  func (m *CanonicalVote) String() string { return proto.CompactTextString(m) }
   238  func (*CanonicalVote) ProtoMessage()    {}
   239  func (*CanonicalVote) Descriptor() ([]byte, []int) {
   240  	return fileDescriptor_8d1a1a84ff7267ed, []int{3}
   241  }
   242  func (m *CanonicalVote) XXX_Unmarshal(b []byte) error {
   243  	return m.Unmarshal(b)
   244  }
   245  func (m *CanonicalVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   246  	if deterministic {
   247  		return xxx_messageInfo_CanonicalVote.Marshal(b, m, deterministic)
   248  	} else {
   249  		b = b[:cap(b)]
   250  		n, err := m.MarshalToSizedBuffer(b)
   251  		if err != nil {
   252  			return nil, err
   253  		}
   254  		return b[:n], nil
   255  	}
   256  }
   257  func (m *CanonicalVote) XXX_Merge(src proto.Message) {
   258  	xxx_messageInfo_CanonicalVote.Merge(m, src)
   259  }
   260  func (m *CanonicalVote) XXX_Size() int {
   261  	return m.Size()
   262  }
   263  func (m *CanonicalVote) XXX_DiscardUnknown() {
   264  	xxx_messageInfo_CanonicalVote.DiscardUnknown(m)
   265  }
   266  
   267  var xxx_messageInfo_CanonicalVote proto.InternalMessageInfo
   268  
   269  func (m *CanonicalVote) GetType() SignedMsgType {
   270  	if m != nil {
   271  		return m.Type
   272  	}
   273  	return UnknownType
   274  }
   275  
   276  func (m *CanonicalVote) GetHeight() int64 {
   277  	if m != nil {
   278  		return m.Height
   279  	}
   280  	return 0
   281  }
   282  
   283  func (m *CanonicalVote) GetRound() int64 {
   284  	if m != nil {
   285  		return m.Round
   286  	}
   287  	return 0
   288  }
   289  
   290  func (m *CanonicalVote) GetBlockID() *CanonicalBlockID {
   291  	if m != nil {
   292  		return m.BlockID
   293  	}
   294  	return nil
   295  }
   296  
   297  func (m *CanonicalVote) GetTimestamp() time.Time {
   298  	if m != nil {
   299  		return m.Timestamp
   300  	}
   301  	return time.Time{}
   302  }
   303  
   304  func (m *CanonicalVote) GetChainID() string {
   305  	if m != nil {
   306  		return m.ChainID
   307  	}
   308  	return ""
   309  }
   310  
   311  func init() {
   312  	proto.RegisterType((*CanonicalBlockID)(nil), "tendermint.types.CanonicalBlockID")
   313  	proto.RegisterType((*CanonicalPartSetHeader)(nil), "tendermint.types.CanonicalPartSetHeader")
   314  	proto.RegisterType((*CanonicalProposal)(nil), "tendermint.types.CanonicalProposal")
   315  	proto.RegisterType((*CanonicalVote)(nil), "tendermint.types.CanonicalVote")
   316  }
   317  
   318  func init() { proto.RegisterFile("tendermint/types/canonical.proto", fileDescriptor_8d1a1a84ff7267ed) }
   319  
   320  var fileDescriptor_8d1a1a84ff7267ed = []byte{
   321  	// 493 bytes of a gzipped FileDescriptorProto
   322  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x53, 0xcb, 0x6e, 0xd3, 0x40,
   323  	0x14, 0x8d, 0x53, 0x27, 0x71, 0xa6, 0x0d, 0x84, 0x51, 0x55, 0x59, 0x11, 0xb2, 0x2d, 0x2f, 0x90,
   324  	0xd9, 0xd8, 0x52, 0xbb, 0x60, 0xef, 0xb2, 0x20, 0x08, 0x44, 0x71, 0xab, 0x2e, 0xd8, 0x44, 0x13,
   325  	0x7b, 0x6a, 0x8f, 0x70, 0x7c, 0x47, 0xf6, 0x64, 0xd1, 0x0d, 0xdf, 0xd0, 0xef, 0xe0, 0x4b, 0xba,
   326  	0xec, 0x12, 0x36, 0x01, 0x39, 0x3f, 0x82, 0x66, 0x9c, 0x97, 0x5a, 0x60, 0x03, 0xea, 0x66, 0x74,
   327  	0x1f, 0x67, 0xce, 0x3d, 0x3a, 0x57, 0x17, 0x39, 0x82, 0x16, 0x09, 0x2d, 0x67, 0xac, 0x10, 0x81,
   328  	0xb8, 0xe6, 0xb4, 0x0a, 0x62, 0x52, 0x40, 0xc1, 0x62, 0x92, 0xfb, 0xbc, 0x04, 0x01, 0x78, 0xb8,
   329  	0x45, 0xf8, 0x0a, 0x31, 0x3a, 0x4c, 0x21, 0x05, 0xd5, 0x0c, 0x64, 0xd4, 0xe0, 0x46, 0xcf, 0x1f,
   330  	0x30, 0xa9, 0x77, 0xd5, 0xb5, 0x53, 0x80, 0x34, 0xa7, 0x81, 0xca, 0xa6, 0xf3, 0xab, 0x40, 0xb0,
   331  	0x19, 0xad, 0x04, 0x99, 0xf1, 0x06, 0xe0, 0x7e, 0x41, 0xc3, 0xd3, 0xf5, 0xe4, 0x30, 0x87, 0xf8,
   332  	0xf3, 0xf8, 0x35, 0xc6, 0x48, 0xcf, 0x48, 0x95, 0x99, 0x9a, 0xa3, 0x79, 0x07, 0x91, 0x8a, 0xf1,
   333  	0x25, 0x7a, 0xca, 0x49, 0x29, 0x26, 0x15, 0x15, 0x93, 0x8c, 0x92, 0x84, 0x96, 0x66, 0xdb, 0xd1,
   334  	0xbc, 0xfd, 0x63, 0xcf, 0xbf, 0x2f, 0xd4, 0xdf, 0x10, 0x9e, 0x91, 0x52, 0x9c, 0x53, 0xf1, 0x46,
   335  	0xe1, 0x43, 0xfd, 0x76, 0x61, 0xb7, 0xa2, 0x01, 0xdf, 0x2d, 0xba, 0x21, 0x3a, 0xfa, 0x3d, 0x1c,
   336  	0x1f, 0xa2, 0x8e, 0x00, 0x41, 0x72, 0x25, 0x63, 0x10, 0x35, 0xc9, 0x46, 0x5b, 0x7b, 0xab, 0xcd,
   337  	0xfd, 0xde, 0x46, 0xcf, 0xb6, 0x24, 0x25, 0x70, 0xa8, 0x48, 0x8e, 0x4f, 0x90, 0x2e, 0xe5, 0xa8,
   338  	0xef, 0x4f, 0x8e, 0xed, 0x87, 0x32, 0xcf, 0x59, 0x5a, 0xd0, 0xe4, 0x7d, 0x95, 0x5e, 0x5c, 0x73,
   339  	0x1a, 0x29, 0x30, 0x3e, 0x42, 0xdd, 0x8c, 0xb2, 0x34, 0x13, 0x6a, 0xc0, 0x30, 0x5a, 0x65, 0x52,
   340  	0x4c, 0x09, 0xf3, 0x22, 0x31, 0xf7, 0x54, 0xb9, 0x49, 0xf0, 0x4b, 0xd4, 0xe7, 0x90, 0x4f, 0x9a,
   341  	0x8e, 0xee, 0x68, 0xde, 0x5e, 0x78, 0x50, 0x2f, 0x6c, 0xe3, 0xec, 0xc3, 0xbb, 0x48, 0xd6, 0x22,
   342  	0x83, 0x43, 0xae, 0x22, 0xfc, 0x16, 0x19, 0x53, 0x69, 0xef, 0x84, 0x25, 0x66, 0x47, 0x19, 0xe7,
   343  	0xfe, 0xc5, 0xb8, 0xd5, 0x26, 0xc2, 0xfd, 0x7a, 0x61, 0xf7, 0x56, 0x49, 0xd4, 0x53, 0x04, 0xe3,
   344  	0x04, 0x87, 0xa8, 0xbf, 0x59, 0xa3, 0xd9, 0x55, 0x64, 0x23, 0xbf, 0x59, 0xb4, 0xbf, 0x5e, 0xb4,
   345  	0x7f, 0xb1, 0x46, 0x84, 0x86, 0xf4, 0xfd, 0xe6, 0x87, 0xad, 0x45, 0xdb, 0x6f, 0xf8, 0x05, 0x32,
   346  	0xe2, 0x8c, 0xb0, 0x42, 0xea, 0xe9, 0x39, 0x9a, 0xd7, 0x6f, 0x66, 0x9d, 0xca, 0x9a, 0x9c, 0xa5,
   347  	0x9a, 0xe3, 0xc4, 0xfd, 0xda, 0x46, 0x83, 0x8d, 0xac, 0x4b, 0x10, 0xf4, 0x31, 0x7c, 0xdd, 0x35,
   348  	0x4b, 0xff, 0x9f, 0x66, 0x75, 0xfe, 0xdd, 0xac, 0xee, 0x9f, 0xcd, 0x0a, 0x3f, 0xde, 0xd6, 0x96,
   349  	0x76, 0x57, 0x5b, 0xda, 0xcf, 0xda, 0xd2, 0x6e, 0x96, 0x56, 0xeb, 0x6e, 0x69, 0xb5, 0xbe, 0x2d,
   350  	0xad, 0xd6, 0xa7, 0x57, 0x29, 0x13, 0xd9, 0x7c, 0xea, 0xc7, 0x30, 0x0b, 0x48, 0x02, 0x25, 0x23,
   351  	0x15, 0x5c, 0x89, 0x60, 0xe7, 0x76, 0x9b, 0xc3, 0xbe, 0x7f, 0xcc, 0xd3, 0xae, 0xaa, 0x9f, 0xfc,
   352  	0x0a, 0x00, 0x00, 0xff, 0xff, 0x62, 0xa0, 0x62, 0x8c, 0x31, 0x04, 0x00, 0x00,
   353  }
   354  
   355  func (m *CanonicalBlockID) Marshal() (dAtA []byte, err error) {
   356  	size := m.Size()
   357  	dAtA = make([]byte, size)
   358  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   359  	if err != nil {
   360  		return nil, err
   361  	}
   362  	return dAtA[:n], nil
   363  }
   364  
   365  func (m *CanonicalBlockID) MarshalTo(dAtA []byte) (int, error) {
   366  	size := m.Size()
   367  	return m.MarshalToSizedBuffer(dAtA[:size])
   368  }
   369  
   370  func (m *CanonicalBlockID) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   371  	i := len(dAtA)
   372  	_ = i
   373  	var l int
   374  	_ = l
   375  	{
   376  		size, err := m.PartSetHeader.MarshalToSizedBuffer(dAtA[:i])
   377  		if err != nil {
   378  			return 0, err
   379  		}
   380  		i -= size
   381  		i = encodeVarintCanonical(dAtA, i, uint64(size))
   382  	}
   383  	i--
   384  	dAtA[i] = 0x12
   385  	if len(m.Hash) > 0 {
   386  		i -= len(m.Hash)
   387  		copy(dAtA[i:], m.Hash)
   388  		i = encodeVarintCanonical(dAtA, i, uint64(len(m.Hash)))
   389  		i--
   390  		dAtA[i] = 0xa
   391  	}
   392  	return len(dAtA) - i, nil
   393  }
   394  
   395  func (m *CanonicalPartSetHeader) Marshal() (dAtA []byte, err error) {
   396  	size := m.Size()
   397  	dAtA = make([]byte, size)
   398  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   399  	if err != nil {
   400  		return nil, err
   401  	}
   402  	return dAtA[:n], nil
   403  }
   404  
   405  func (m *CanonicalPartSetHeader) MarshalTo(dAtA []byte) (int, error) {
   406  	size := m.Size()
   407  	return m.MarshalToSizedBuffer(dAtA[:size])
   408  }
   409  
   410  func (m *CanonicalPartSetHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   411  	i := len(dAtA)
   412  	_ = i
   413  	var l int
   414  	_ = l
   415  	if len(m.Hash) > 0 {
   416  		i -= len(m.Hash)
   417  		copy(dAtA[i:], m.Hash)
   418  		i = encodeVarintCanonical(dAtA, i, uint64(len(m.Hash)))
   419  		i--
   420  		dAtA[i] = 0x12
   421  	}
   422  	if m.Total != 0 {
   423  		i = encodeVarintCanonical(dAtA, i, uint64(m.Total))
   424  		i--
   425  		dAtA[i] = 0x8
   426  	}
   427  	return len(dAtA) - i, nil
   428  }
   429  
   430  func (m *CanonicalProposal) Marshal() (dAtA []byte, err error) {
   431  	size := m.Size()
   432  	dAtA = make([]byte, size)
   433  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   434  	if err != nil {
   435  		return nil, err
   436  	}
   437  	return dAtA[:n], nil
   438  }
   439  
   440  func (m *CanonicalProposal) MarshalTo(dAtA []byte) (int, error) {
   441  	size := m.Size()
   442  	return m.MarshalToSizedBuffer(dAtA[:size])
   443  }
   444  
   445  func (m *CanonicalProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   446  	i := len(dAtA)
   447  	_ = i
   448  	var l int
   449  	_ = l
   450  	if len(m.ChainID) > 0 {
   451  		i -= len(m.ChainID)
   452  		copy(dAtA[i:], m.ChainID)
   453  		i = encodeVarintCanonical(dAtA, i, uint64(len(m.ChainID)))
   454  		i--
   455  		dAtA[i] = 0x3a
   456  	}
   457  	n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):])
   458  	if err2 != nil {
   459  		return 0, err2
   460  	}
   461  	i -= n2
   462  	i = encodeVarintCanonical(dAtA, i, uint64(n2))
   463  	i--
   464  	dAtA[i] = 0x32
   465  	if m.BlockID != nil {
   466  		{
   467  			size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i])
   468  			if err != nil {
   469  				return 0, err
   470  			}
   471  			i -= size
   472  			i = encodeVarintCanonical(dAtA, i, uint64(size))
   473  		}
   474  		i--
   475  		dAtA[i] = 0x2a
   476  	}
   477  	if m.POLRound != 0 {
   478  		i = encodeVarintCanonical(dAtA, i, uint64(m.POLRound))
   479  		i--
   480  		dAtA[i] = 0x20
   481  	}
   482  	if m.Round != 0 {
   483  		i -= 8
   484  		encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Round))
   485  		i--
   486  		dAtA[i] = 0x19
   487  	}
   488  	if m.Height != 0 {
   489  		i -= 8
   490  		encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Height))
   491  		i--
   492  		dAtA[i] = 0x11
   493  	}
   494  	if m.Type != 0 {
   495  		i = encodeVarintCanonical(dAtA, i, uint64(m.Type))
   496  		i--
   497  		dAtA[i] = 0x8
   498  	}
   499  	return len(dAtA) - i, nil
   500  }
   501  
   502  func (m *CanonicalVote) Marshal() (dAtA []byte, err error) {
   503  	size := m.Size()
   504  	dAtA = make([]byte, size)
   505  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   506  	if err != nil {
   507  		return nil, err
   508  	}
   509  	return dAtA[:n], nil
   510  }
   511  
   512  func (m *CanonicalVote) MarshalTo(dAtA []byte) (int, error) {
   513  	size := m.Size()
   514  	return m.MarshalToSizedBuffer(dAtA[:size])
   515  }
   516  
   517  func (m *CanonicalVote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   518  	i := len(dAtA)
   519  	_ = i
   520  	var l int
   521  	_ = l
   522  	if len(m.ChainID) > 0 {
   523  		i -= len(m.ChainID)
   524  		copy(dAtA[i:], m.ChainID)
   525  		i = encodeVarintCanonical(dAtA, i, uint64(len(m.ChainID)))
   526  		i--
   527  		dAtA[i] = 0x32
   528  	}
   529  	n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):])
   530  	if err4 != nil {
   531  		return 0, err4
   532  	}
   533  	i -= n4
   534  	i = encodeVarintCanonical(dAtA, i, uint64(n4))
   535  	i--
   536  	dAtA[i] = 0x2a
   537  	if m.BlockID != nil {
   538  		{
   539  			size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i])
   540  			if err != nil {
   541  				return 0, err
   542  			}
   543  			i -= size
   544  			i = encodeVarintCanonical(dAtA, i, uint64(size))
   545  		}
   546  		i--
   547  		dAtA[i] = 0x22
   548  	}
   549  	if m.Round != 0 {
   550  		i -= 8
   551  		encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Round))
   552  		i--
   553  		dAtA[i] = 0x19
   554  	}
   555  	if m.Height != 0 {
   556  		i -= 8
   557  		encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Height))
   558  		i--
   559  		dAtA[i] = 0x11
   560  	}
   561  	if m.Type != 0 {
   562  		i = encodeVarintCanonical(dAtA, i, uint64(m.Type))
   563  		i--
   564  		dAtA[i] = 0x8
   565  	}
   566  	return len(dAtA) - i, nil
   567  }
   568  
   569  func encodeVarintCanonical(dAtA []byte, offset int, v uint64) int {
   570  	offset -= sovCanonical(v)
   571  	base := offset
   572  	for v >= 1<<7 {
   573  		dAtA[offset] = uint8(v&0x7f | 0x80)
   574  		v >>= 7
   575  		offset++
   576  	}
   577  	dAtA[offset] = uint8(v)
   578  	return base
   579  }
   580  func (m *CanonicalBlockID) Size() (n int) {
   581  	if m == nil {
   582  		return 0
   583  	}
   584  	var l int
   585  	_ = l
   586  	l = len(m.Hash)
   587  	if l > 0 {
   588  		n += 1 + l + sovCanonical(uint64(l))
   589  	}
   590  	l = m.PartSetHeader.Size()
   591  	n += 1 + l + sovCanonical(uint64(l))
   592  	return n
   593  }
   594  
   595  func (m *CanonicalPartSetHeader) Size() (n int) {
   596  	if m == nil {
   597  		return 0
   598  	}
   599  	var l int
   600  	_ = l
   601  	if m.Total != 0 {
   602  		n += 1 + sovCanonical(uint64(m.Total))
   603  	}
   604  	l = len(m.Hash)
   605  	if l > 0 {
   606  		n += 1 + l + sovCanonical(uint64(l))
   607  	}
   608  	return n
   609  }
   610  
   611  func (m *CanonicalProposal) Size() (n int) {
   612  	if m == nil {
   613  		return 0
   614  	}
   615  	var l int
   616  	_ = l
   617  	if m.Type != 0 {
   618  		n += 1 + sovCanonical(uint64(m.Type))
   619  	}
   620  	if m.Height != 0 {
   621  		n += 9
   622  	}
   623  	if m.Round != 0 {
   624  		n += 9
   625  	}
   626  	if m.POLRound != 0 {
   627  		n += 1 + sovCanonical(uint64(m.POLRound))
   628  	}
   629  	if m.BlockID != nil {
   630  		l = m.BlockID.Size()
   631  		n += 1 + l + sovCanonical(uint64(l))
   632  	}
   633  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
   634  	n += 1 + l + sovCanonical(uint64(l))
   635  	l = len(m.ChainID)
   636  	if l > 0 {
   637  		n += 1 + l + sovCanonical(uint64(l))
   638  	}
   639  	return n
   640  }
   641  
   642  func (m *CanonicalVote) Size() (n int) {
   643  	if m == nil {
   644  		return 0
   645  	}
   646  	var l int
   647  	_ = l
   648  	if m.Type != 0 {
   649  		n += 1 + sovCanonical(uint64(m.Type))
   650  	}
   651  	if m.Height != 0 {
   652  		n += 9
   653  	}
   654  	if m.Round != 0 {
   655  		n += 9
   656  	}
   657  	if m.BlockID != nil {
   658  		l = m.BlockID.Size()
   659  		n += 1 + l + sovCanonical(uint64(l))
   660  	}
   661  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
   662  	n += 1 + l + sovCanonical(uint64(l))
   663  	l = len(m.ChainID)
   664  	if l > 0 {
   665  		n += 1 + l + sovCanonical(uint64(l))
   666  	}
   667  	return n
   668  }
   669  
   670  func sovCanonical(x uint64) (n int) {
   671  	return (math_bits.Len64(x|1) + 6) / 7
   672  }
   673  func sozCanonical(x uint64) (n int) {
   674  	return sovCanonical(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   675  }
   676  func (m *CanonicalBlockID) Unmarshal(dAtA []byte) error {
   677  	l := len(dAtA)
   678  	iNdEx := 0
   679  	for iNdEx < l {
   680  		preIndex := iNdEx
   681  		var wire uint64
   682  		for shift := uint(0); ; shift += 7 {
   683  			if shift >= 64 {
   684  				return ErrIntOverflowCanonical
   685  			}
   686  			if iNdEx >= l {
   687  				return io.ErrUnexpectedEOF
   688  			}
   689  			b := dAtA[iNdEx]
   690  			iNdEx++
   691  			wire |= uint64(b&0x7F) << shift
   692  			if b < 0x80 {
   693  				break
   694  			}
   695  		}
   696  		fieldNum := int32(wire >> 3)
   697  		wireType := int(wire & 0x7)
   698  		if wireType == 4 {
   699  			return fmt.Errorf("proto: CanonicalBlockID: wiretype end group for non-group")
   700  		}
   701  		if fieldNum <= 0 {
   702  			return fmt.Errorf("proto: CanonicalBlockID: illegal tag %d (wire type %d)", fieldNum, wire)
   703  		}
   704  		switch fieldNum {
   705  		case 1:
   706  			if wireType != 2 {
   707  				return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
   708  			}
   709  			var byteLen int
   710  			for shift := uint(0); ; shift += 7 {
   711  				if shift >= 64 {
   712  					return ErrIntOverflowCanonical
   713  				}
   714  				if iNdEx >= l {
   715  					return io.ErrUnexpectedEOF
   716  				}
   717  				b := dAtA[iNdEx]
   718  				iNdEx++
   719  				byteLen |= int(b&0x7F) << shift
   720  				if b < 0x80 {
   721  					break
   722  				}
   723  			}
   724  			if byteLen < 0 {
   725  				return ErrInvalidLengthCanonical
   726  			}
   727  			postIndex := iNdEx + byteLen
   728  			if postIndex < 0 {
   729  				return ErrInvalidLengthCanonical
   730  			}
   731  			if postIndex > l {
   732  				return io.ErrUnexpectedEOF
   733  			}
   734  			m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
   735  			if m.Hash == nil {
   736  				m.Hash = []byte{}
   737  			}
   738  			iNdEx = postIndex
   739  		case 2:
   740  			if wireType != 2 {
   741  				return fmt.Errorf("proto: wrong wireType = %d for field PartSetHeader", wireType)
   742  			}
   743  			var msglen int
   744  			for shift := uint(0); ; shift += 7 {
   745  				if shift >= 64 {
   746  					return ErrIntOverflowCanonical
   747  				}
   748  				if iNdEx >= l {
   749  					return io.ErrUnexpectedEOF
   750  				}
   751  				b := dAtA[iNdEx]
   752  				iNdEx++
   753  				msglen |= int(b&0x7F) << shift
   754  				if b < 0x80 {
   755  					break
   756  				}
   757  			}
   758  			if msglen < 0 {
   759  				return ErrInvalidLengthCanonical
   760  			}
   761  			postIndex := iNdEx + msglen
   762  			if postIndex < 0 {
   763  				return ErrInvalidLengthCanonical
   764  			}
   765  			if postIndex > l {
   766  				return io.ErrUnexpectedEOF
   767  			}
   768  			if err := m.PartSetHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   769  				return err
   770  			}
   771  			iNdEx = postIndex
   772  		default:
   773  			iNdEx = preIndex
   774  			skippy, err := skipCanonical(dAtA[iNdEx:])
   775  			if err != nil {
   776  				return err
   777  			}
   778  			if skippy < 0 {
   779  				return ErrInvalidLengthCanonical
   780  			}
   781  			if (iNdEx + skippy) < 0 {
   782  				return ErrInvalidLengthCanonical
   783  			}
   784  			if (iNdEx + skippy) > l {
   785  				return io.ErrUnexpectedEOF
   786  			}
   787  			iNdEx += skippy
   788  		}
   789  	}
   790  
   791  	if iNdEx > l {
   792  		return io.ErrUnexpectedEOF
   793  	}
   794  	return nil
   795  }
   796  func (m *CanonicalPartSetHeader) Unmarshal(dAtA []byte) error {
   797  	l := len(dAtA)
   798  	iNdEx := 0
   799  	for iNdEx < l {
   800  		preIndex := iNdEx
   801  		var wire uint64
   802  		for shift := uint(0); ; shift += 7 {
   803  			if shift >= 64 {
   804  				return ErrIntOverflowCanonical
   805  			}
   806  			if iNdEx >= l {
   807  				return io.ErrUnexpectedEOF
   808  			}
   809  			b := dAtA[iNdEx]
   810  			iNdEx++
   811  			wire |= uint64(b&0x7F) << shift
   812  			if b < 0x80 {
   813  				break
   814  			}
   815  		}
   816  		fieldNum := int32(wire >> 3)
   817  		wireType := int(wire & 0x7)
   818  		if wireType == 4 {
   819  			return fmt.Errorf("proto: CanonicalPartSetHeader: wiretype end group for non-group")
   820  		}
   821  		if fieldNum <= 0 {
   822  			return fmt.Errorf("proto: CanonicalPartSetHeader: illegal tag %d (wire type %d)", fieldNum, wire)
   823  		}
   824  		switch fieldNum {
   825  		case 1:
   826  			if wireType != 0 {
   827  				return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType)
   828  			}
   829  			m.Total = 0
   830  			for shift := uint(0); ; shift += 7 {
   831  				if shift >= 64 {
   832  					return ErrIntOverflowCanonical
   833  				}
   834  				if iNdEx >= l {
   835  					return io.ErrUnexpectedEOF
   836  				}
   837  				b := dAtA[iNdEx]
   838  				iNdEx++
   839  				m.Total |= uint32(b&0x7F) << shift
   840  				if b < 0x80 {
   841  					break
   842  				}
   843  			}
   844  		case 2:
   845  			if wireType != 2 {
   846  				return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
   847  			}
   848  			var byteLen int
   849  			for shift := uint(0); ; shift += 7 {
   850  				if shift >= 64 {
   851  					return ErrIntOverflowCanonical
   852  				}
   853  				if iNdEx >= l {
   854  					return io.ErrUnexpectedEOF
   855  				}
   856  				b := dAtA[iNdEx]
   857  				iNdEx++
   858  				byteLen |= int(b&0x7F) << shift
   859  				if b < 0x80 {
   860  					break
   861  				}
   862  			}
   863  			if byteLen < 0 {
   864  				return ErrInvalidLengthCanonical
   865  			}
   866  			postIndex := iNdEx + byteLen
   867  			if postIndex < 0 {
   868  				return ErrInvalidLengthCanonical
   869  			}
   870  			if postIndex > l {
   871  				return io.ErrUnexpectedEOF
   872  			}
   873  			m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
   874  			if m.Hash == nil {
   875  				m.Hash = []byte{}
   876  			}
   877  			iNdEx = postIndex
   878  		default:
   879  			iNdEx = preIndex
   880  			skippy, err := skipCanonical(dAtA[iNdEx:])
   881  			if err != nil {
   882  				return err
   883  			}
   884  			if skippy < 0 {
   885  				return ErrInvalidLengthCanonical
   886  			}
   887  			if (iNdEx + skippy) < 0 {
   888  				return ErrInvalidLengthCanonical
   889  			}
   890  			if (iNdEx + skippy) > l {
   891  				return io.ErrUnexpectedEOF
   892  			}
   893  			iNdEx += skippy
   894  		}
   895  	}
   896  
   897  	if iNdEx > l {
   898  		return io.ErrUnexpectedEOF
   899  	}
   900  	return nil
   901  }
   902  func (m *CanonicalProposal) Unmarshal(dAtA []byte) error {
   903  	l := len(dAtA)
   904  	iNdEx := 0
   905  	for iNdEx < l {
   906  		preIndex := iNdEx
   907  		var wire uint64
   908  		for shift := uint(0); ; shift += 7 {
   909  			if shift >= 64 {
   910  				return ErrIntOverflowCanonical
   911  			}
   912  			if iNdEx >= l {
   913  				return io.ErrUnexpectedEOF
   914  			}
   915  			b := dAtA[iNdEx]
   916  			iNdEx++
   917  			wire |= uint64(b&0x7F) << shift
   918  			if b < 0x80 {
   919  				break
   920  			}
   921  		}
   922  		fieldNum := int32(wire >> 3)
   923  		wireType := int(wire & 0x7)
   924  		if wireType == 4 {
   925  			return fmt.Errorf("proto: CanonicalProposal: wiretype end group for non-group")
   926  		}
   927  		if fieldNum <= 0 {
   928  			return fmt.Errorf("proto: CanonicalProposal: illegal tag %d (wire type %d)", fieldNum, wire)
   929  		}
   930  		switch fieldNum {
   931  		case 1:
   932  			if wireType != 0 {
   933  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
   934  			}
   935  			m.Type = 0
   936  			for shift := uint(0); ; shift += 7 {
   937  				if shift >= 64 {
   938  					return ErrIntOverflowCanonical
   939  				}
   940  				if iNdEx >= l {
   941  					return io.ErrUnexpectedEOF
   942  				}
   943  				b := dAtA[iNdEx]
   944  				iNdEx++
   945  				m.Type |= SignedMsgType(b&0x7F) << shift
   946  				if b < 0x80 {
   947  					break
   948  				}
   949  			}
   950  		case 2:
   951  			if wireType != 1 {
   952  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
   953  			}
   954  			m.Height = 0
   955  			if (iNdEx + 8) > l {
   956  				return io.ErrUnexpectedEOF
   957  			}
   958  			m.Height = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
   959  			iNdEx += 8
   960  		case 3:
   961  			if wireType != 1 {
   962  				return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
   963  			}
   964  			m.Round = 0
   965  			if (iNdEx + 8) > l {
   966  				return io.ErrUnexpectedEOF
   967  			}
   968  			m.Round = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
   969  			iNdEx += 8
   970  		case 4:
   971  			if wireType != 0 {
   972  				return fmt.Errorf("proto: wrong wireType = %d for field POLRound", wireType)
   973  			}
   974  			m.POLRound = 0
   975  			for shift := uint(0); ; shift += 7 {
   976  				if shift >= 64 {
   977  					return ErrIntOverflowCanonical
   978  				}
   979  				if iNdEx >= l {
   980  					return io.ErrUnexpectedEOF
   981  				}
   982  				b := dAtA[iNdEx]
   983  				iNdEx++
   984  				m.POLRound |= int64(b&0x7F) << shift
   985  				if b < 0x80 {
   986  					break
   987  				}
   988  			}
   989  		case 5:
   990  			if wireType != 2 {
   991  				return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType)
   992  			}
   993  			var msglen int
   994  			for shift := uint(0); ; shift += 7 {
   995  				if shift >= 64 {
   996  					return ErrIntOverflowCanonical
   997  				}
   998  				if iNdEx >= l {
   999  					return io.ErrUnexpectedEOF
  1000  				}
  1001  				b := dAtA[iNdEx]
  1002  				iNdEx++
  1003  				msglen |= int(b&0x7F) << shift
  1004  				if b < 0x80 {
  1005  					break
  1006  				}
  1007  			}
  1008  			if msglen < 0 {
  1009  				return ErrInvalidLengthCanonical
  1010  			}
  1011  			postIndex := iNdEx + msglen
  1012  			if postIndex < 0 {
  1013  				return ErrInvalidLengthCanonical
  1014  			}
  1015  			if postIndex > l {
  1016  				return io.ErrUnexpectedEOF
  1017  			}
  1018  			if m.BlockID == nil {
  1019  				m.BlockID = &CanonicalBlockID{}
  1020  			}
  1021  			if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1022  				return err
  1023  			}
  1024  			iNdEx = postIndex
  1025  		case 6:
  1026  			if wireType != 2 {
  1027  				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
  1028  			}
  1029  			var msglen int
  1030  			for shift := uint(0); ; shift += 7 {
  1031  				if shift >= 64 {
  1032  					return ErrIntOverflowCanonical
  1033  				}
  1034  				if iNdEx >= l {
  1035  					return io.ErrUnexpectedEOF
  1036  				}
  1037  				b := dAtA[iNdEx]
  1038  				iNdEx++
  1039  				msglen |= int(b&0x7F) << shift
  1040  				if b < 0x80 {
  1041  					break
  1042  				}
  1043  			}
  1044  			if msglen < 0 {
  1045  				return ErrInvalidLengthCanonical
  1046  			}
  1047  			postIndex := iNdEx + msglen
  1048  			if postIndex < 0 {
  1049  				return ErrInvalidLengthCanonical
  1050  			}
  1051  			if postIndex > l {
  1052  				return io.ErrUnexpectedEOF
  1053  			}
  1054  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
  1055  				return err
  1056  			}
  1057  			iNdEx = postIndex
  1058  		case 7:
  1059  			if wireType != 2 {
  1060  				return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType)
  1061  			}
  1062  			var stringLen uint64
  1063  			for shift := uint(0); ; shift += 7 {
  1064  				if shift >= 64 {
  1065  					return ErrIntOverflowCanonical
  1066  				}
  1067  				if iNdEx >= l {
  1068  					return io.ErrUnexpectedEOF
  1069  				}
  1070  				b := dAtA[iNdEx]
  1071  				iNdEx++
  1072  				stringLen |= uint64(b&0x7F) << shift
  1073  				if b < 0x80 {
  1074  					break
  1075  				}
  1076  			}
  1077  			intStringLen := int(stringLen)
  1078  			if intStringLen < 0 {
  1079  				return ErrInvalidLengthCanonical
  1080  			}
  1081  			postIndex := iNdEx + intStringLen
  1082  			if postIndex < 0 {
  1083  				return ErrInvalidLengthCanonical
  1084  			}
  1085  			if postIndex > l {
  1086  				return io.ErrUnexpectedEOF
  1087  			}
  1088  			m.ChainID = string(dAtA[iNdEx:postIndex])
  1089  			iNdEx = postIndex
  1090  		default:
  1091  			iNdEx = preIndex
  1092  			skippy, err := skipCanonical(dAtA[iNdEx:])
  1093  			if err != nil {
  1094  				return err
  1095  			}
  1096  			if skippy < 0 {
  1097  				return ErrInvalidLengthCanonical
  1098  			}
  1099  			if (iNdEx + skippy) < 0 {
  1100  				return ErrInvalidLengthCanonical
  1101  			}
  1102  			if (iNdEx + skippy) > l {
  1103  				return io.ErrUnexpectedEOF
  1104  			}
  1105  			iNdEx += skippy
  1106  		}
  1107  	}
  1108  
  1109  	if iNdEx > l {
  1110  		return io.ErrUnexpectedEOF
  1111  	}
  1112  	return nil
  1113  }
  1114  func (m *CanonicalVote) Unmarshal(dAtA []byte) error {
  1115  	l := len(dAtA)
  1116  	iNdEx := 0
  1117  	for iNdEx < l {
  1118  		preIndex := iNdEx
  1119  		var wire uint64
  1120  		for shift := uint(0); ; shift += 7 {
  1121  			if shift >= 64 {
  1122  				return ErrIntOverflowCanonical
  1123  			}
  1124  			if iNdEx >= l {
  1125  				return io.ErrUnexpectedEOF
  1126  			}
  1127  			b := dAtA[iNdEx]
  1128  			iNdEx++
  1129  			wire |= uint64(b&0x7F) << shift
  1130  			if b < 0x80 {
  1131  				break
  1132  			}
  1133  		}
  1134  		fieldNum := int32(wire >> 3)
  1135  		wireType := int(wire & 0x7)
  1136  		if wireType == 4 {
  1137  			return fmt.Errorf("proto: CanonicalVote: wiretype end group for non-group")
  1138  		}
  1139  		if fieldNum <= 0 {
  1140  			return fmt.Errorf("proto: CanonicalVote: illegal tag %d (wire type %d)", fieldNum, wire)
  1141  		}
  1142  		switch fieldNum {
  1143  		case 1:
  1144  			if wireType != 0 {
  1145  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  1146  			}
  1147  			m.Type = 0
  1148  			for shift := uint(0); ; shift += 7 {
  1149  				if shift >= 64 {
  1150  					return ErrIntOverflowCanonical
  1151  				}
  1152  				if iNdEx >= l {
  1153  					return io.ErrUnexpectedEOF
  1154  				}
  1155  				b := dAtA[iNdEx]
  1156  				iNdEx++
  1157  				m.Type |= SignedMsgType(b&0x7F) << shift
  1158  				if b < 0x80 {
  1159  					break
  1160  				}
  1161  			}
  1162  		case 2:
  1163  			if wireType != 1 {
  1164  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  1165  			}
  1166  			m.Height = 0
  1167  			if (iNdEx + 8) > l {
  1168  				return io.ErrUnexpectedEOF
  1169  			}
  1170  			m.Height = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1171  			iNdEx += 8
  1172  		case 3:
  1173  			if wireType != 1 {
  1174  				return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  1175  			}
  1176  			m.Round = 0
  1177  			if (iNdEx + 8) > l {
  1178  				return io.ErrUnexpectedEOF
  1179  			}
  1180  			m.Round = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1181  			iNdEx += 8
  1182  		case 4:
  1183  			if wireType != 2 {
  1184  				return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType)
  1185  			}
  1186  			var msglen int
  1187  			for shift := uint(0); ; shift += 7 {
  1188  				if shift >= 64 {
  1189  					return ErrIntOverflowCanonical
  1190  				}
  1191  				if iNdEx >= l {
  1192  					return io.ErrUnexpectedEOF
  1193  				}
  1194  				b := dAtA[iNdEx]
  1195  				iNdEx++
  1196  				msglen |= int(b&0x7F) << shift
  1197  				if b < 0x80 {
  1198  					break
  1199  				}
  1200  			}
  1201  			if msglen < 0 {
  1202  				return ErrInvalidLengthCanonical
  1203  			}
  1204  			postIndex := iNdEx + msglen
  1205  			if postIndex < 0 {
  1206  				return ErrInvalidLengthCanonical
  1207  			}
  1208  			if postIndex > l {
  1209  				return io.ErrUnexpectedEOF
  1210  			}
  1211  			if m.BlockID == nil {
  1212  				m.BlockID = &CanonicalBlockID{}
  1213  			}
  1214  			if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1215  				return err
  1216  			}
  1217  			iNdEx = postIndex
  1218  		case 5:
  1219  			if wireType != 2 {
  1220  				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
  1221  			}
  1222  			var msglen int
  1223  			for shift := uint(0); ; shift += 7 {
  1224  				if shift >= 64 {
  1225  					return ErrIntOverflowCanonical
  1226  				}
  1227  				if iNdEx >= l {
  1228  					return io.ErrUnexpectedEOF
  1229  				}
  1230  				b := dAtA[iNdEx]
  1231  				iNdEx++
  1232  				msglen |= int(b&0x7F) << shift
  1233  				if b < 0x80 {
  1234  					break
  1235  				}
  1236  			}
  1237  			if msglen < 0 {
  1238  				return ErrInvalidLengthCanonical
  1239  			}
  1240  			postIndex := iNdEx + msglen
  1241  			if postIndex < 0 {
  1242  				return ErrInvalidLengthCanonical
  1243  			}
  1244  			if postIndex > l {
  1245  				return io.ErrUnexpectedEOF
  1246  			}
  1247  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
  1248  				return err
  1249  			}
  1250  			iNdEx = postIndex
  1251  		case 6:
  1252  			if wireType != 2 {
  1253  				return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType)
  1254  			}
  1255  			var stringLen uint64
  1256  			for shift := uint(0); ; shift += 7 {
  1257  				if shift >= 64 {
  1258  					return ErrIntOverflowCanonical
  1259  				}
  1260  				if iNdEx >= l {
  1261  					return io.ErrUnexpectedEOF
  1262  				}
  1263  				b := dAtA[iNdEx]
  1264  				iNdEx++
  1265  				stringLen |= uint64(b&0x7F) << shift
  1266  				if b < 0x80 {
  1267  					break
  1268  				}
  1269  			}
  1270  			intStringLen := int(stringLen)
  1271  			if intStringLen < 0 {
  1272  				return ErrInvalidLengthCanonical
  1273  			}
  1274  			postIndex := iNdEx + intStringLen
  1275  			if postIndex < 0 {
  1276  				return ErrInvalidLengthCanonical
  1277  			}
  1278  			if postIndex > l {
  1279  				return io.ErrUnexpectedEOF
  1280  			}
  1281  			m.ChainID = string(dAtA[iNdEx:postIndex])
  1282  			iNdEx = postIndex
  1283  		default:
  1284  			iNdEx = preIndex
  1285  			skippy, err := skipCanonical(dAtA[iNdEx:])
  1286  			if err != nil {
  1287  				return err
  1288  			}
  1289  			if skippy < 0 {
  1290  				return ErrInvalidLengthCanonical
  1291  			}
  1292  			if (iNdEx + skippy) < 0 {
  1293  				return ErrInvalidLengthCanonical
  1294  			}
  1295  			if (iNdEx + skippy) > l {
  1296  				return io.ErrUnexpectedEOF
  1297  			}
  1298  			iNdEx += skippy
  1299  		}
  1300  	}
  1301  
  1302  	if iNdEx > l {
  1303  		return io.ErrUnexpectedEOF
  1304  	}
  1305  	return nil
  1306  }
  1307  func skipCanonical(dAtA []byte) (n int, err error) {
  1308  	l := len(dAtA)
  1309  	iNdEx := 0
  1310  	depth := 0
  1311  	for iNdEx < l {
  1312  		var wire uint64
  1313  		for shift := uint(0); ; shift += 7 {
  1314  			if shift >= 64 {
  1315  				return 0, ErrIntOverflowCanonical
  1316  			}
  1317  			if iNdEx >= l {
  1318  				return 0, io.ErrUnexpectedEOF
  1319  			}
  1320  			b := dAtA[iNdEx]
  1321  			iNdEx++
  1322  			wire |= (uint64(b) & 0x7F) << shift
  1323  			if b < 0x80 {
  1324  				break
  1325  			}
  1326  		}
  1327  		wireType := int(wire & 0x7)
  1328  		switch wireType {
  1329  		case 0:
  1330  			for shift := uint(0); ; shift += 7 {
  1331  				if shift >= 64 {
  1332  					return 0, ErrIntOverflowCanonical
  1333  				}
  1334  				if iNdEx >= l {
  1335  					return 0, io.ErrUnexpectedEOF
  1336  				}
  1337  				iNdEx++
  1338  				if dAtA[iNdEx-1] < 0x80 {
  1339  					break
  1340  				}
  1341  			}
  1342  		case 1:
  1343  			iNdEx += 8
  1344  		case 2:
  1345  			var length int
  1346  			for shift := uint(0); ; shift += 7 {
  1347  				if shift >= 64 {
  1348  					return 0, ErrIntOverflowCanonical
  1349  				}
  1350  				if iNdEx >= l {
  1351  					return 0, io.ErrUnexpectedEOF
  1352  				}
  1353  				b := dAtA[iNdEx]
  1354  				iNdEx++
  1355  				length |= (int(b) & 0x7F) << shift
  1356  				if b < 0x80 {
  1357  					break
  1358  				}
  1359  			}
  1360  			if length < 0 {
  1361  				return 0, ErrInvalidLengthCanonical
  1362  			}
  1363  			iNdEx += length
  1364  		case 3:
  1365  			depth++
  1366  		case 4:
  1367  			if depth == 0 {
  1368  				return 0, ErrUnexpectedEndOfGroupCanonical
  1369  			}
  1370  			depth--
  1371  		case 5:
  1372  			iNdEx += 4
  1373  		default:
  1374  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1375  		}
  1376  		if iNdEx < 0 {
  1377  			return 0, ErrInvalidLengthCanonical
  1378  		}
  1379  		if depth == 0 {
  1380  			return iNdEx, nil
  1381  		}
  1382  	}
  1383  	return 0, io.ErrUnexpectedEOF
  1384  }
  1385  
  1386  var (
  1387  	ErrInvalidLengthCanonical        = fmt.Errorf("proto: negative length found during unmarshaling")
  1388  	ErrIntOverflowCanonical          = fmt.Errorf("proto: integer overflow")
  1389  	ErrUnexpectedEndOfGroupCanonical = fmt.Errorf("proto: unexpected end of group")
  1390  )