github.com/Finschia/finschia-sdk@v0.48.1/x/gov/types/genesis.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: cosmos/gov/v1beta1/genesis.proto
     3  
     4  package types
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	io "io"
    11  	math "math"
    12  	math_bits "math/bits"
    13  )
    14  
    15  // Reference imports to suppress errors if they are not otherwise used.
    16  var _ = proto.Marshal
    17  var _ = fmt.Errorf
    18  var _ = math.Inf
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the proto package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // proto package needs to be updated.
    24  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    25  
    26  // GenesisState defines the gov module's genesis state.
    27  type GenesisState struct {
    28  	// starting_proposal_id is the ID of the starting proposal.
    29  	StartingProposalId uint64 `protobuf:"varint,1,opt,name=starting_proposal_id,json=startingProposalId,proto3" json:"starting_proposal_id,omitempty" yaml:"starting_proposal_id"`
    30  	// deposits defines all the deposits present at genesis.
    31  	Deposits Deposits `protobuf:"bytes,2,rep,name=deposits,proto3,castrepeated=Deposits" json:"deposits"`
    32  	// votes defines all the votes present at genesis.
    33  	Votes Votes `protobuf:"bytes,3,rep,name=votes,proto3,castrepeated=Votes" json:"votes"`
    34  	// proposals defines all the proposals present at genesis.
    35  	Proposals Proposals `protobuf:"bytes,4,rep,name=proposals,proto3,castrepeated=Proposals" json:"proposals"`
    36  	// params defines all the paramaters of related to deposit.
    37  	DepositParams DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params" yaml:"deposit_params"`
    38  	// params defines all the paramaters of related to voting.
    39  	VotingParams VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params" yaml:"voting_params"`
    40  	// params defines all the paramaters of related to tally.
    41  	TallyParams TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params" yaml:"tally_params"`
    42  }
    43  
    44  func (m *GenesisState) Reset()         { *m = GenesisState{} }
    45  func (m *GenesisState) String() string { return proto.CompactTextString(m) }
    46  func (*GenesisState) ProtoMessage()    {}
    47  func (*GenesisState) Descriptor() ([]byte, []int) {
    48  	return fileDescriptor_43cd825e0fa7a627, []int{0}
    49  }
    50  func (m *GenesisState) XXX_Unmarshal(b []byte) error {
    51  	return m.Unmarshal(b)
    52  }
    53  func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    54  	if deterministic {
    55  		return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic)
    56  	} else {
    57  		b = b[:cap(b)]
    58  		n, err := m.MarshalToSizedBuffer(b)
    59  		if err != nil {
    60  			return nil, err
    61  		}
    62  		return b[:n], nil
    63  	}
    64  }
    65  func (m *GenesisState) XXX_Merge(src proto.Message) {
    66  	xxx_messageInfo_GenesisState.Merge(m, src)
    67  }
    68  func (m *GenesisState) XXX_Size() int {
    69  	return m.Size()
    70  }
    71  func (m *GenesisState) XXX_DiscardUnknown() {
    72  	xxx_messageInfo_GenesisState.DiscardUnknown(m)
    73  }
    74  
    75  var xxx_messageInfo_GenesisState proto.InternalMessageInfo
    76  
    77  func (m *GenesisState) GetStartingProposalId() uint64 {
    78  	if m != nil {
    79  		return m.StartingProposalId
    80  	}
    81  	return 0
    82  }
    83  
    84  func (m *GenesisState) GetDeposits() Deposits {
    85  	if m != nil {
    86  		return m.Deposits
    87  	}
    88  	return nil
    89  }
    90  
    91  func (m *GenesisState) GetVotes() Votes {
    92  	if m != nil {
    93  		return m.Votes
    94  	}
    95  	return nil
    96  }
    97  
    98  func (m *GenesisState) GetProposals() Proposals {
    99  	if m != nil {
   100  		return m.Proposals
   101  	}
   102  	return nil
   103  }
   104  
   105  func (m *GenesisState) GetDepositParams() DepositParams {
   106  	if m != nil {
   107  		return m.DepositParams
   108  	}
   109  	return DepositParams{}
   110  }
   111  
   112  func (m *GenesisState) GetVotingParams() VotingParams {
   113  	if m != nil {
   114  		return m.VotingParams
   115  	}
   116  	return VotingParams{}
   117  }
   118  
   119  func (m *GenesisState) GetTallyParams() TallyParams {
   120  	if m != nil {
   121  		return m.TallyParams
   122  	}
   123  	return TallyParams{}
   124  }
   125  
   126  func init() {
   127  	proto.RegisterType((*GenesisState)(nil), "cosmos.gov.v1beta1.GenesisState")
   128  }
   129  
   130  func init() { proto.RegisterFile("cosmos/gov/v1beta1/genesis.proto", fileDescriptor_43cd825e0fa7a627) }
   131  
   132  var fileDescriptor_43cd825e0fa7a627 = []byte{
   133  	// 437 bytes of a gzipped FileDescriptorProto
   134  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x41, 0x6f, 0xd3, 0x30,
   135  	0x14, 0xc7, 0x1b, 0xd6, 0x8e, 0xcd, 0x6d, 0x11, 0x98, 0x22, 0x45, 0x6b, 0x49, 0x42, 0x4e, 0x3d,
   136  	0x40, 0xa2, 0x8d, 0x1b, 0x12, 0x97, 0x08, 0x0d, 0xed, 0x80, 0x34, 0x02, 0xe2, 0xc0, 0xa5, 0x72,
   137  	0x1b, 0xe3, 0x45, 0x34, 0x7d, 0x51, 0x9e, 0x89, 0xe8, 0xb7, 0xe0, 0x73, 0xf0, 0x49, 0x76, 0xdc,
   138  	0x91, 0x53, 0x41, 0xed, 0x89, 0xeb, 0x3e, 0x01, 0x8a, 0xed, 0x40, 0x26, 0x02, 0x37, 0xfb, 0xf9,
   139  	0xef, 0xdf, 0xef, 0xf9, 0xc9, 0xc4, 0x5b, 0x00, 0x66, 0x80, 0xa1, 0x80, 0x32, 0x2c, 0x8f, 0xe7,
   140  	0x5c, 0xb2, 0xe3, 0x50, 0xf0, 0x15, 0xc7, 0x14, 0x83, 0xbc, 0x00, 0x09, 0x94, 0xea, 0x44, 0x20,
   141  	0xa0, 0x0c, 0x4c, 0xe2, 0x68, 0x24, 0x40, 0x80, 0x3a, 0x0e, 0xab, 0x95, 0x4e, 0x1e, 0x4d, 0xda,
   142  	0x58, 0x50, 0xea, 0x53, 0xff, 0x67, 0x97, 0x0c, 0x5e, 0x6a, 0xf2, 0x1b, 0xc9, 0x24, 0xa7, 0xaf,
   143  	0xc9, 0x08, 0x25, 0x2b, 0x64, 0xba, 0x12, 0xb3, 0xbc, 0x80, 0x1c, 0x90, 0x2d, 0x67, 0x69, 0x62,
   144  	0x5b, 0x9e, 0x35, 0xed, 0x46, 0xee, 0xf5, 0xc6, 0x1d, 0xaf, 0x59, 0xb6, 0x7c, 0xe6, 0xb7, 0xa5,
   145  	0xfc, 0x98, 0xd6, 0xe5, 0x73, 0x53, 0x3d, 0x4b, 0xe8, 0x19, 0x39, 0x48, 0x78, 0x0e, 0x98, 0x4a,
   146  	0xb4, 0x6f, 0x79, 0x7b, 0xd3, 0xfe, 0xc9, 0x38, 0xf8, 0xbb, 0xfd, 0xe0, 0x85, 0xce, 0x44, 0x77,
   147  	0x2f, 0x37, 0x6e, 0xe7, 0xeb, 0x77, 0xf7, 0xc0, 0x14, 0x30, 0xfe, 0x7d, 0x9d, 0x3e, 0x27, 0xbd,
   148  	0x12, 0x24, 0x47, 0x7b, 0x4f, 0x71, 0xec, 0x36, 0xce, 0x3b, 0x90, 0x3c, 0x1a, 0x1a, 0x48, 0xaf,
   149  	0xda, 0x61, 0xac, 0x6f, 0xd1, 0x57, 0xe4, 0xb0, 0xee, 0x16, 0xed, 0xae, 0x42, 0x4c, 0xda, 0x10,
   150  	0x75, 0xf3, 0xd1, 0x3d, 0x83, 0x39, 0xac, 0x2b, 0x18, 0xff, 0x21, 0x50, 0x41, 0xee, 0x98, 0xce,
   151  	0x66, 0x39, 0x2b, 0x58, 0x86, 0x76, 0xcf, 0xb3, 0xa6, 0xfd, 0x93, 0x47, 0xff, 0x79, 0xde, 0xb9,
   152  	0x0a, 0x46, 0x0f, 0x2b, 0xf0, 0xf5, 0xc6, 0x7d, 0xa0, 0x87, 0x79, 0x13, 0xe3, 0xc7, 0xc3, 0xa4,
   153  	0x99, 0xa6, 0x0b, 0x32, 0x2c, 0x41, 0x0f, 0x5b, 0x7b, 0xf6, 0x95, 0xc7, 0xfb, 0xc7, 0xf3, 0xab,
   154  	0xf1, 0x6b, 0xcd, 0xc4, 0x68, 0x46, 0x5a, 0x73, 0x03, 0xe2, 0xc7, 0x83, 0xb2, 0x91, 0xa5, 0x33,
   155  	0x32, 0x90, 0x6c, 0xb9, 0x5c, 0xd7, 0x8e, 0xdb, 0xca, 0xe1, 0xb6, 0x39, 0xde, 0x56, 0x39, 0xa3,
   156  	0x18, 0x1b, 0xc5, 0x7d, 0xad, 0x68, 0x22, 0xfc, 0xb8, 0x2f, 0x1b, 0xc9, 0xd3, 0xcb, 0xad, 0x63,
   157  	0x5d, 0x6d, 0x1d, 0xeb, 0xc7, 0xd6, 0xb1, 0xbe, 0xec, 0x9c, 0xce, 0xd5, 0xce, 0xe9, 0x7c, 0xdb,
   158  	0x39, 0x9d, 0xf7, 0x8f, 0x45, 0x2a, 0x2f, 0x3e, 0xcd, 0x83, 0x05, 0x64, 0xe1, 0x69, 0xba, 0xc2,
   159  	0xc5, 0x45, 0xca, 0xc2, 0x0f, 0x66, 0xf1, 0x04, 0x93, 0x8f, 0xe1, 0x67, 0xf5, 0x7f, 0xe5, 0x3a,
   160  	0xe7, 0x38, 0xdf, 0x57, 0x5f, 0xf7, 0xe9, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x1d, 0x11,
   161  	0xeb, 0x26, 0x03, 0x00, 0x00,
   162  }
   163  
   164  func (m *GenesisState) Marshal() (dAtA []byte, err error) {
   165  	size := m.Size()
   166  	dAtA = make([]byte, size)
   167  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   168  	if err != nil {
   169  		return nil, err
   170  	}
   171  	return dAtA[:n], nil
   172  }
   173  
   174  func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) {
   175  	size := m.Size()
   176  	return m.MarshalToSizedBuffer(dAtA[:size])
   177  }
   178  
   179  func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   180  	i := len(dAtA)
   181  	_ = i
   182  	var l int
   183  	_ = l
   184  	{
   185  		size, err := m.TallyParams.MarshalToSizedBuffer(dAtA[:i])
   186  		if err != nil {
   187  			return 0, err
   188  		}
   189  		i -= size
   190  		i = encodeVarintGenesis(dAtA, i, uint64(size))
   191  	}
   192  	i--
   193  	dAtA[i] = 0x3a
   194  	{
   195  		size, err := m.VotingParams.MarshalToSizedBuffer(dAtA[:i])
   196  		if err != nil {
   197  			return 0, err
   198  		}
   199  		i -= size
   200  		i = encodeVarintGenesis(dAtA, i, uint64(size))
   201  	}
   202  	i--
   203  	dAtA[i] = 0x32
   204  	{
   205  		size, err := m.DepositParams.MarshalToSizedBuffer(dAtA[:i])
   206  		if err != nil {
   207  			return 0, err
   208  		}
   209  		i -= size
   210  		i = encodeVarintGenesis(dAtA, i, uint64(size))
   211  	}
   212  	i--
   213  	dAtA[i] = 0x2a
   214  	if len(m.Proposals) > 0 {
   215  		for iNdEx := len(m.Proposals) - 1; iNdEx >= 0; iNdEx-- {
   216  			{
   217  				size, err := m.Proposals[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   218  				if err != nil {
   219  					return 0, err
   220  				}
   221  				i -= size
   222  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   223  			}
   224  			i--
   225  			dAtA[i] = 0x22
   226  		}
   227  	}
   228  	if len(m.Votes) > 0 {
   229  		for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- {
   230  			{
   231  				size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   232  				if err != nil {
   233  					return 0, err
   234  				}
   235  				i -= size
   236  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   237  			}
   238  			i--
   239  			dAtA[i] = 0x1a
   240  		}
   241  	}
   242  	if len(m.Deposits) > 0 {
   243  		for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- {
   244  			{
   245  				size, err := m.Deposits[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   246  				if err != nil {
   247  					return 0, err
   248  				}
   249  				i -= size
   250  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   251  			}
   252  			i--
   253  			dAtA[i] = 0x12
   254  		}
   255  	}
   256  	if m.StartingProposalId != 0 {
   257  		i = encodeVarintGenesis(dAtA, i, uint64(m.StartingProposalId))
   258  		i--
   259  		dAtA[i] = 0x8
   260  	}
   261  	return len(dAtA) - i, nil
   262  }
   263  
   264  func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
   265  	offset -= sovGenesis(v)
   266  	base := offset
   267  	for v >= 1<<7 {
   268  		dAtA[offset] = uint8(v&0x7f | 0x80)
   269  		v >>= 7
   270  		offset++
   271  	}
   272  	dAtA[offset] = uint8(v)
   273  	return base
   274  }
   275  func (m *GenesisState) Size() (n int) {
   276  	if m == nil {
   277  		return 0
   278  	}
   279  	var l int
   280  	_ = l
   281  	if m.StartingProposalId != 0 {
   282  		n += 1 + sovGenesis(uint64(m.StartingProposalId))
   283  	}
   284  	if len(m.Deposits) > 0 {
   285  		for _, e := range m.Deposits {
   286  			l = e.Size()
   287  			n += 1 + l + sovGenesis(uint64(l))
   288  		}
   289  	}
   290  	if len(m.Votes) > 0 {
   291  		for _, e := range m.Votes {
   292  			l = e.Size()
   293  			n += 1 + l + sovGenesis(uint64(l))
   294  		}
   295  	}
   296  	if len(m.Proposals) > 0 {
   297  		for _, e := range m.Proposals {
   298  			l = e.Size()
   299  			n += 1 + l + sovGenesis(uint64(l))
   300  		}
   301  	}
   302  	l = m.DepositParams.Size()
   303  	n += 1 + l + sovGenesis(uint64(l))
   304  	l = m.VotingParams.Size()
   305  	n += 1 + l + sovGenesis(uint64(l))
   306  	l = m.TallyParams.Size()
   307  	n += 1 + l + sovGenesis(uint64(l))
   308  	return n
   309  }
   310  
   311  func sovGenesis(x uint64) (n int) {
   312  	return (math_bits.Len64(x|1) + 6) / 7
   313  }
   314  func sozGenesis(x uint64) (n int) {
   315  	return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   316  }
   317  func (m *GenesisState) Unmarshal(dAtA []byte) error {
   318  	l := len(dAtA)
   319  	iNdEx := 0
   320  	for iNdEx < l {
   321  		preIndex := iNdEx
   322  		var wire uint64
   323  		for shift := uint(0); ; shift += 7 {
   324  			if shift >= 64 {
   325  				return ErrIntOverflowGenesis
   326  			}
   327  			if iNdEx >= l {
   328  				return io.ErrUnexpectedEOF
   329  			}
   330  			b := dAtA[iNdEx]
   331  			iNdEx++
   332  			wire |= uint64(b&0x7F) << shift
   333  			if b < 0x80 {
   334  				break
   335  			}
   336  		}
   337  		fieldNum := int32(wire >> 3)
   338  		wireType := int(wire & 0x7)
   339  		if wireType == 4 {
   340  			return fmt.Errorf("proto: GenesisState: wiretype end group for non-group")
   341  		}
   342  		if fieldNum <= 0 {
   343  			return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
   344  		}
   345  		switch fieldNum {
   346  		case 1:
   347  			if wireType != 0 {
   348  				return fmt.Errorf("proto: wrong wireType = %d for field StartingProposalId", wireType)
   349  			}
   350  			m.StartingProposalId = 0
   351  			for shift := uint(0); ; shift += 7 {
   352  				if shift >= 64 {
   353  					return ErrIntOverflowGenesis
   354  				}
   355  				if iNdEx >= l {
   356  					return io.ErrUnexpectedEOF
   357  				}
   358  				b := dAtA[iNdEx]
   359  				iNdEx++
   360  				m.StartingProposalId |= uint64(b&0x7F) << shift
   361  				if b < 0x80 {
   362  					break
   363  				}
   364  			}
   365  		case 2:
   366  			if wireType != 2 {
   367  				return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType)
   368  			}
   369  			var msglen int
   370  			for shift := uint(0); ; shift += 7 {
   371  				if shift >= 64 {
   372  					return ErrIntOverflowGenesis
   373  				}
   374  				if iNdEx >= l {
   375  					return io.ErrUnexpectedEOF
   376  				}
   377  				b := dAtA[iNdEx]
   378  				iNdEx++
   379  				msglen |= int(b&0x7F) << shift
   380  				if b < 0x80 {
   381  					break
   382  				}
   383  			}
   384  			if msglen < 0 {
   385  				return ErrInvalidLengthGenesis
   386  			}
   387  			postIndex := iNdEx + msglen
   388  			if postIndex < 0 {
   389  				return ErrInvalidLengthGenesis
   390  			}
   391  			if postIndex > l {
   392  				return io.ErrUnexpectedEOF
   393  			}
   394  			m.Deposits = append(m.Deposits, Deposit{})
   395  			if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   396  				return err
   397  			}
   398  			iNdEx = postIndex
   399  		case 3:
   400  			if wireType != 2 {
   401  				return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType)
   402  			}
   403  			var msglen int
   404  			for shift := uint(0); ; shift += 7 {
   405  				if shift >= 64 {
   406  					return ErrIntOverflowGenesis
   407  				}
   408  				if iNdEx >= l {
   409  					return io.ErrUnexpectedEOF
   410  				}
   411  				b := dAtA[iNdEx]
   412  				iNdEx++
   413  				msglen |= int(b&0x7F) << shift
   414  				if b < 0x80 {
   415  					break
   416  				}
   417  			}
   418  			if msglen < 0 {
   419  				return ErrInvalidLengthGenesis
   420  			}
   421  			postIndex := iNdEx + msglen
   422  			if postIndex < 0 {
   423  				return ErrInvalidLengthGenesis
   424  			}
   425  			if postIndex > l {
   426  				return io.ErrUnexpectedEOF
   427  			}
   428  			m.Votes = append(m.Votes, Vote{})
   429  			if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   430  				return err
   431  			}
   432  			iNdEx = postIndex
   433  		case 4:
   434  			if wireType != 2 {
   435  				return fmt.Errorf("proto: wrong wireType = %d for field Proposals", wireType)
   436  			}
   437  			var msglen int
   438  			for shift := uint(0); ; shift += 7 {
   439  				if shift >= 64 {
   440  					return ErrIntOverflowGenesis
   441  				}
   442  				if iNdEx >= l {
   443  					return io.ErrUnexpectedEOF
   444  				}
   445  				b := dAtA[iNdEx]
   446  				iNdEx++
   447  				msglen |= int(b&0x7F) << shift
   448  				if b < 0x80 {
   449  					break
   450  				}
   451  			}
   452  			if msglen < 0 {
   453  				return ErrInvalidLengthGenesis
   454  			}
   455  			postIndex := iNdEx + msglen
   456  			if postIndex < 0 {
   457  				return ErrInvalidLengthGenesis
   458  			}
   459  			if postIndex > l {
   460  				return io.ErrUnexpectedEOF
   461  			}
   462  			m.Proposals = append(m.Proposals, Proposal{})
   463  			if err := m.Proposals[len(m.Proposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   464  				return err
   465  			}
   466  			iNdEx = postIndex
   467  		case 5:
   468  			if wireType != 2 {
   469  				return fmt.Errorf("proto: wrong wireType = %d for field DepositParams", wireType)
   470  			}
   471  			var msglen int
   472  			for shift := uint(0); ; shift += 7 {
   473  				if shift >= 64 {
   474  					return ErrIntOverflowGenesis
   475  				}
   476  				if iNdEx >= l {
   477  					return io.ErrUnexpectedEOF
   478  				}
   479  				b := dAtA[iNdEx]
   480  				iNdEx++
   481  				msglen |= int(b&0x7F) << shift
   482  				if b < 0x80 {
   483  					break
   484  				}
   485  			}
   486  			if msglen < 0 {
   487  				return ErrInvalidLengthGenesis
   488  			}
   489  			postIndex := iNdEx + msglen
   490  			if postIndex < 0 {
   491  				return ErrInvalidLengthGenesis
   492  			}
   493  			if postIndex > l {
   494  				return io.ErrUnexpectedEOF
   495  			}
   496  			if err := m.DepositParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   497  				return err
   498  			}
   499  			iNdEx = postIndex
   500  		case 6:
   501  			if wireType != 2 {
   502  				return fmt.Errorf("proto: wrong wireType = %d for field VotingParams", wireType)
   503  			}
   504  			var msglen int
   505  			for shift := uint(0); ; shift += 7 {
   506  				if shift >= 64 {
   507  					return ErrIntOverflowGenesis
   508  				}
   509  				if iNdEx >= l {
   510  					return io.ErrUnexpectedEOF
   511  				}
   512  				b := dAtA[iNdEx]
   513  				iNdEx++
   514  				msglen |= int(b&0x7F) << shift
   515  				if b < 0x80 {
   516  					break
   517  				}
   518  			}
   519  			if msglen < 0 {
   520  				return ErrInvalidLengthGenesis
   521  			}
   522  			postIndex := iNdEx + msglen
   523  			if postIndex < 0 {
   524  				return ErrInvalidLengthGenesis
   525  			}
   526  			if postIndex > l {
   527  				return io.ErrUnexpectedEOF
   528  			}
   529  			if err := m.VotingParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   530  				return err
   531  			}
   532  			iNdEx = postIndex
   533  		case 7:
   534  			if wireType != 2 {
   535  				return fmt.Errorf("proto: wrong wireType = %d for field TallyParams", wireType)
   536  			}
   537  			var msglen int
   538  			for shift := uint(0); ; shift += 7 {
   539  				if shift >= 64 {
   540  					return ErrIntOverflowGenesis
   541  				}
   542  				if iNdEx >= l {
   543  					return io.ErrUnexpectedEOF
   544  				}
   545  				b := dAtA[iNdEx]
   546  				iNdEx++
   547  				msglen |= int(b&0x7F) << shift
   548  				if b < 0x80 {
   549  					break
   550  				}
   551  			}
   552  			if msglen < 0 {
   553  				return ErrInvalidLengthGenesis
   554  			}
   555  			postIndex := iNdEx + msglen
   556  			if postIndex < 0 {
   557  				return ErrInvalidLengthGenesis
   558  			}
   559  			if postIndex > l {
   560  				return io.ErrUnexpectedEOF
   561  			}
   562  			if err := m.TallyParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   563  				return err
   564  			}
   565  			iNdEx = postIndex
   566  		default:
   567  			iNdEx = preIndex
   568  			skippy, err := skipGenesis(dAtA[iNdEx:])
   569  			if err != nil {
   570  				return err
   571  			}
   572  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   573  				return ErrInvalidLengthGenesis
   574  			}
   575  			if (iNdEx + skippy) > l {
   576  				return io.ErrUnexpectedEOF
   577  			}
   578  			iNdEx += skippy
   579  		}
   580  	}
   581  
   582  	if iNdEx > l {
   583  		return io.ErrUnexpectedEOF
   584  	}
   585  	return nil
   586  }
   587  func skipGenesis(dAtA []byte) (n int, err error) {
   588  	l := len(dAtA)
   589  	iNdEx := 0
   590  	depth := 0
   591  	for iNdEx < l {
   592  		var wire uint64
   593  		for shift := uint(0); ; shift += 7 {
   594  			if shift >= 64 {
   595  				return 0, ErrIntOverflowGenesis
   596  			}
   597  			if iNdEx >= l {
   598  				return 0, io.ErrUnexpectedEOF
   599  			}
   600  			b := dAtA[iNdEx]
   601  			iNdEx++
   602  			wire |= (uint64(b) & 0x7F) << shift
   603  			if b < 0x80 {
   604  				break
   605  			}
   606  		}
   607  		wireType := int(wire & 0x7)
   608  		switch wireType {
   609  		case 0:
   610  			for shift := uint(0); ; shift += 7 {
   611  				if shift >= 64 {
   612  					return 0, ErrIntOverflowGenesis
   613  				}
   614  				if iNdEx >= l {
   615  					return 0, io.ErrUnexpectedEOF
   616  				}
   617  				iNdEx++
   618  				if dAtA[iNdEx-1] < 0x80 {
   619  					break
   620  				}
   621  			}
   622  		case 1:
   623  			iNdEx += 8
   624  		case 2:
   625  			var length int
   626  			for shift := uint(0); ; shift += 7 {
   627  				if shift >= 64 {
   628  					return 0, ErrIntOverflowGenesis
   629  				}
   630  				if iNdEx >= l {
   631  					return 0, io.ErrUnexpectedEOF
   632  				}
   633  				b := dAtA[iNdEx]
   634  				iNdEx++
   635  				length |= (int(b) & 0x7F) << shift
   636  				if b < 0x80 {
   637  					break
   638  				}
   639  			}
   640  			if length < 0 {
   641  				return 0, ErrInvalidLengthGenesis
   642  			}
   643  			iNdEx += length
   644  		case 3:
   645  			depth++
   646  		case 4:
   647  			if depth == 0 {
   648  				return 0, ErrUnexpectedEndOfGroupGenesis
   649  			}
   650  			depth--
   651  		case 5:
   652  			iNdEx += 4
   653  		default:
   654  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   655  		}
   656  		if iNdEx < 0 {
   657  			return 0, ErrInvalidLengthGenesis
   658  		}
   659  		if depth == 0 {
   660  			return iNdEx, nil
   661  		}
   662  	}
   663  	return 0, io.ErrUnexpectedEOF
   664  }
   665  
   666  var (
   667  	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
   668  	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
   669  	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
   670  )