github.com/cosmos/cosmos-sdk@v0.50.10/x/consensus/types/tx.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/consensus/v1/tx.proto 3 4 package types 5 6 import ( 7 context "context" 8 fmt "fmt" 9 types "github.com/cometbft/cometbft/proto/tendermint/types" 10 _ "github.com/cosmos/cosmos-proto" 11 _ "github.com/cosmos/cosmos-sdk/types/msgservice" 12 _ "github.com/cosmos/cosmos-sdk/types/tx/amino" 13 grpc1 "github.com/cosmos/gogoproto/grpc" 14 proto "github.com/cosmos/gogoproto/proto" 15 grpc "google.golang.org/grpc" 16 codes "google.golang.org/grpc/codes" 17 status "google.golang.org/grpc/status" 18 io "io" 19 math "math" 20 math_bits "math/bits" 21 ) 22 23 // Reference imports to suppress errors if they are not otherwise used. 24 var _ = proto.Marshal 25 var _ = fmt.Errorf 26 var _ = math.Inf 27 28 // This is a compile-time assertion to ensure that this generated file 29 // is compatible with the proto package it is being compiled against. 30 // A compilation error at this line likely means your copy of the 31 // proto package needs to be updated. 32 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 33 34 // MsgUpdateParams is the Msg/UpdateParams request type. 35 type MsgUpdateParams struct { 36 // authority is the address that controls the module (defaults to x/gov unless overwritten). 37 Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` 38 // params defines the x/consensus parameters to update. 39 // VersionsParams is not included in this Msg because it is tracked 40 // separarately in x/upgrade. 41 // 42 // NOTE: All parameters must be supplied. 43 Block *types.BlockParams `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` 44 Evidence *types.EvidenceParams `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"` 45 Validator *types.ValidatorParams `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` 46 // Since: cosmos-sdk 0.50 47 Abci *types.ABCIParams `protobuf:"bytes,5,opt,name=abci,proto3" json:"abci,omitempty"` 48 } 49 50 func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } 51 func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } 52 func (*MsgUpdateParams) ProtoMessage() {} 53 func (*MsgUpdateParams) Descriptor() ([]byte, []int) { 54 return fileDescriptor_2135c60575ab504d, []int{0} 55 } 56 func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { 57 return m.Unmarshal(b) 58 } 59 func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 60 if deterministic { 61 return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) 62 } else { 63 b = b[:cap(b)] 64 n, err := m.MarshalToSizedBuffer(b) 65 if err != nil { 66 return nil, err 67 } 68 return b[:n], nil 69 } 70 } 71 func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { 72 xxx_messageInfo_MsgUpdateParams.Merge(m, src) 73 } 74 func (m *MsgUpdateParams) XXX_Size() int { 75 return m.Size() 76 } 77 func (m *MsgUpdateParams) XXX_DiscardUnknown() { 78 xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) 79 } 80 81 var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo 82 83 func (m *MsgUpdateParams) GetAuthority() string { 84 if m != nil { 85 return m.Authority 86 } 87 return "" 88 } 89 90 func (m *MsgUpdateParams) GetBlock() *types.BlockParams { 91 if m != nil { 92 return m.Block 93 } 94 return nil 95 } 96 97 func (m *MsgUpdateParams) GetEvidence() *types.EvidenceParams { 98 if m != nil { 99 return m.Evidence 100 } 101 return nil 102 } 103 104 func (m *MsgUpdateParams) GetValidator() *types.ValidatorParams { 105 if m != nil { 106 return m.Validator 107 } 108 return nil 109 } 110 111 func (m *MsgUpdateParams) GetAbci() *types.ABCIParams { 112 if m != nil { 113 return m.Abci 114 } 115 return nil 116 } 117 118 // MsgUpdateParamsResponse defines the response structure for executing a 119 // MsgUpdateParams message. 120 type MsgUpdateParamsResponse struct { 121 } 122 123 func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } 124 func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } 125 func (*MsgUpdateParamsResponse) ProtoMessage() {} 126 func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { 127 return fileDescriptor_2135c60575ab504d, []int{1} 128 } 129 func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { 130 return m.Unmarshal(b) 131 } 132 func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 133 if deterministic { 134 return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) 135 } else { 136 b = b[:cap(b)] 137 n, err := m.MarshalToSizedBuffer(b) 138 if err != nil { 139 return nil, err 140 } 141 return b[:n], nil 142 } 143 } 144 func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { 145 xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) 146 } 147 func (m *MsgUpdateParamsResponse) XXX_Size() int { 148 return m.Size() 149 } 150 func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { 151 xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) 152 } 153 154 var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo 155 156 func init() { 157 proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.consensus.v1.MsgUpdateParams") 158 proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.consensus.v1.MsgUpdateParamsResponse") 159 } 160 161 func init() { proto.RegisterFile("cosmos/consensus/v1/tx.proto", fileDescriptor_2135c60575ab504d) } 162 163 var fileDescriptor_2135c60575ab504d = []byte{ 164 // 421 bytes of a gzipped FileDescriptorProto 165 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0xcb, 0x12, 0x41, 166 0x1c, 0xc7, 0x5d, 0xff, 0x44, 0x4e, 0x41, 0xb4, 0x05, 0xae, 0x8b, 0x2e, 0x26, 0x11, 0x22, 0x39, 167 0x93, 0x0a, 0x41, 0x11, 0x84, 0x1b, 0x41, 0x1d, 0x84, 0x30, 0xea, 0xd0, 0x25, 0x66, 0x77, 0x87, 168 0x75, 0xd0, 0xdd, 0x59, 0x76, 0xc6, 0x45, 0x6f, 0xd1, 0xb1, 0x53, 0x2f, 0xc5, 0x43, 0x2f, 0xa2, 169 0xa3, 0x74, 0xea, 0xf8, 0xa0, 0x07, 0xe1, 0x79, 0x15, 0x0f, 0xce, 0x8e, 0xee, 0xf3, 0xa8, 0x87, 170 0xe7, 0x22, 0xb8, 0xdf, 0xcf, 0x67, 0xbe, 0xcc, 0x6f, 0x7e, 0xa0, 0xe6, 0x32, 0x1e, 0x30, 0x8e, 171 0x5c, 0x16, 0x72, 0x12, 0xf2, 0x19, 0x47, 0x49, 0x17, 0x89, 0x39, 0x8c, 0x62, 0x26, 0x98, 0xfe, 172 0x28, 0x4d, 0xe1, 0x21, 0x85, 0x49, 0xd7, 0x7c, 0x88, 0x03, 0x1a, 0x32, 0x24, 0x7f, 0x53, 0xce, 173 0xac, 0xa6, 0xdc, 0x77, 0xf9, 0x0f, 0x29, 0x29, 0x8d, 0x2a, 0xaa, 0x20, 0xe0, 0xfe, 0xee, 0xe8, 174 0x80, 0xfb, 0x2a, 0xa8, 0x0b, 0x12, 0x7a, 0x24, 0x0e, 0x68, 0x28, 0x90, 0x58, 0x44, 0x84, 0xa3, 175 0x08, 0xc7, 0x38, 0x50, 0x5e, 0xf3, 0x32, 0x0f, 0x1e, 0x0c, 0xb9, 0xff, 0x25, 0xf2, 0xb0, 0x20, 176 0x9f, 0x64, 0xa2, 0xbf, 0x04, 0x65, 0x3c, 0x13, 0x63, 0x16, 0x53, 0xb1, 0x30, 0xb4, 0x86, 0xd6, 177 0x2a, 0xdb, 0xc6, 0xbf, 0x3f, 0x9d, 0xc7, 0xaa, 0x70, 0xe0, 0x79, 0x31, 0xe1, 0xfc, 0xb3, 0x88, 178 0x69, 0xe8, 0x8f, 0x32, 0x54, 0xef, 0x83, 0x92, 0x33, 0x65, 0xee, 0xc4, 0xc8, 0x37, 0xb4, 0xd6, 179 0xbd, 0x5e, 0x1d, 0x66, 0xd5, 0x50, 0x56, 0x43, 0x7b, 0x17, 0xa7, 0x2d, 0xa3, 0x94, 0xd5, 0xdf, 180 0x80, 0xbb, 0x24, 0xa1, 0x1e, 0x09, 0x5d, 0x62, 0x14, 0xa4, 0xd7, 0x38, 0xf5, 0xde, 0x2b, 0x42, 181 0xa9, 0x07, 0x43, 0x7f, 0x0b, 0xca, 0x09, 0x9e, 0x52, 0x0f, 0x0b, 0x16, 0x1b, 0x45, 0xa9, 0x3f, 182 0x39, 0xd5, 0xbf, 0xee, 0x11, 0xe5, 0x67, 0x8e, 0xfe, 0x02, 0x14, 0xb1, 0xe3, 0x52, 0xa3, 0x24, 183 0xdd, 0xda, 0xa9, 0x3b, 0xb0, 0xdf, 0x7d, 0x54, 0x9a, 0x24, 0x5f, 0xbf, 0xfa, 0xb9, 0x5d, 0xb6, 184 0xb3, 0x5b, 0xff, 0xda, 0x2e, 0xdb, 0xcf, 0xd2, 0xc9, 0x74, 0xb8, 0x37, 0x41, 0xf3, 0x6b, 0x6f, 185 0x7c, 0x34, 0xd8, 0x66, 0x15, 0x54, 0x8e, 0x3e, 0x8d, 0x08, 0x8f, 0x76, 0x78, 0x2f, 0x02, 0x85, 186 0x21, 0xf7, 0x75, 0x07, 0xdc, 0xbf, 0xf1, 0x14, 0x4f, 0xe1, 0x99, 0xd5, 0x80, 0x47, 0x87, 0x98, 187 0xcf, 0x6f, 0x43, 0xed, 0xab, 0xcc, 0xd2, 0x8f, 0xed, 0xb2, 0xad, 0xd9, 0x1f, 0xfe, 0xae, 0x2d, 188 0x6d, 0xb5, 0xb6, 0xb4, 0x8b, 0xb5, 0xa5, 0xfd, 0xde, 0x58, 0xb9, 0xd5, 0xc6, 0xca, 0xfd, 0xdf, 189 0x58, 0xb9, 0x6f, 0xd0, 0xa7, 0x62, 0x3c, 0x73, 0xa0, 0xcb, 0x02, 0x74, 0xd8, 0xdb, 0xb3, 0x17, 190 0x94, 0x23, 0x72, 0xee, 0xc8, 0x55, 0xea, 0x5f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x27, 0xbf, 191 0x79, 0xe5, 0x02, 0x00, 0x00, 192 } 193 194 // Reference imports to suppress errors if they are not otherwise used. 195 var _ context.Context 196 var _ grpc.ClientConn 197 198 // This is a compile-time assertion to ensure that this generated file 199 // is compatible with the grpc package it is being compiled against. 200 const _ = grpc.SupportPackageIsVersion4 201 202 // MsgClient is the client API for Msg service. 203 // 204 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 205 type MsgClient interface { 206 // UpdateParams defines a governance operation for updating the x/consensus module parameters. 207 // The authority is defined in the keeper. 208 // 209 // Since: cosmos-sdk 0.47 210 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) 211 } 212 213 type msgClient struct { 214 cc grpc1.ClientConn 215 } 216 217 func NewMsgClient(cc grpc1.ClientConn) MsgClient { 218 return &msgClient{cc} 219 } 220 221 func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { 222 out := new(MsgUpdateParamsResponse) 223 err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Msg/UpdateParams", in, out, opts...) 224 if err != nil { 225 return nil, err 226 } 227 return out, nil 228 } 229 230 // MsgServer is the server API for Msg service. 231 type MsgServer interface { 232 // UpdateParams defines a governance operation for updating the x/consensus module parameters. 233 // The authority is defined in the keeper. 234 // 235 // Since: cosmos-sdk 0.47 236 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) 237 } 238 239 // UnimplementedMsgServer can be embedded to have forward compatible implementations. 240 type UnimplementedMsgServer struct { 241 } 242 243 func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { 244 return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") 245 } 246 247 func RegisterMsgServer(s grpc1.Server, srv MsgServer) { 248 s.RegisterService(&_Msg_serviceDesc, srv) 249 } 250 251 func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 252 in := new(MsgUpdateParams) 253 if err := dec(in); err != nil { 254 return nil, err 255 } 256 if interceptor == nil { 257 return srv.(MsgServer).UpdateParams(ctx, in) 258 } 259 info := &grpc.UnaryServerInfo{ 260 Server: srv, 261 FullMethod: "/cosmos.consensus.v1.Msg/UpdateParams", 262 } 263 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 264 return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) 265 } 266 return interceptor(ctx, in, info, handler) 267 } 268 269 var _Msg_serviceDesc = grpc.ServiceDesc{ 270 ServiceName: "cosmos.consensus.v1.Msg", 271 HandlerType: (*MsgServer)(nil), 272 Methods: []grpc.MethodDesc{ 273 { 274 MethodName: "UpdateParams", 275 Handler: _Msg_UpdateParams_Handler, 276 }, 277 }, 278 Streams: []grpc.StreamDesc{}, 279 Metadata: "cosmos/consensus/v1/tx.proto", 280 } 281 282 func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { 283 size := m.Size() 284 dAtA = make([]byte, size) 285 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 286 if err != nil { 287 return nil, err 288 } 289 return dAtA[:n], nil 290 } 291 292 func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { 293 size := m.Size() 294 return m.MarshalToSizedBuffer(dAtA[:size]) 295 } 296 297 func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { 298 i := len(dAtA) 299 _ = i 300 var l int 301 _ = l 302 if m.Abci != nil { 303 { 304 size, err := m.Abci.MarshalToSizedBuffer(dAtA[:i]) 305 if err != nil { 306 return 0, err 307 } 308 i -= size 309 i = encodeVarintTx(dAtA, i, uint64(size)) 310 } 311 i-- 312 dAtA[i] = 0x2a 313 } 314 if m.Validator != nil { 315 { 316 size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) 317 if err != nil { 318 return 0, err 319 } 320 i -= size 321 i = encodeVarintTx(dAtA, i, uint64(size)) 322 } 323 i-- 324 dAtA[i] = 0x22 325 } 326 if m.Evidence != nil { 327 { 328 size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) 329 if err != nil { 330 return 0, err 331 } 332 i -= size 333 i = encodeVarintTx(dAtA, i, uint64(size)) 334 } 335 i-- 336 dAtA[i] = 0x1a 337 } 338 if m.Block != nil { 339 { 340 size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) 341 if err != nil { 342 return 0, err 343 } 344 i -= size 345 i = encodeVarintTx(dAtA, i, uint64(size)) 346 } 347 i-- 348 dAtA[i] = 0x12 349 } 350 if len(m.Authority) > 0 { 351 i -= len(m.Authority) 352 copy(dAtA[i:], m.Authority) 353 i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) 354 i-- 355 dAtA[i] = 0xa 356 } 357 return len(dAtA) - i, nil 358 } 359 360 func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { 361 size := m.Size() 362 dAtA = make([]byte, size) 363 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 364 if err != nil { 365 return nil, err 366 } 367 return dAtA[:n], nil 368 } 369 370 func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { 371 size := m.Size() 372 return m.MarshalToSizedBuffer(dAtA[:size]) 373 } 374 375 func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 376 i := len(dAtA) 377 _ = i 378 var l int 379 _ = l 380 return len(dAtA) - i, nil 381 } 382 383 func encodeVarintTx(dAtA []byte, offset int, v uint64) int { 384 offset -= sovTx(v) 385 base := offset 386 for v >= 1<<7 { 387 dAtA[offset] = uint8(v&0x7f | 0x80) 388 v >>= 7 389 offset++ 390 } 391 dAtA[offset] = uint8(v) 392 return base 393 } 394 func (m *MsgUpdateParams) Size() (n int) { 395 if m == nil { 396 return 0 397 } 398 var l int 399 _ = l 400 l = len(m.Authority) 401 if l > 0 { 402 n += 1 + l + sovTx(uint64(l)) 403 } 404 if m.Block != nil { 405 l = m.Block.Size() 406 n += 1 + l + sovTx(uint64(l)) 407 } 408 if m.Evidence != nil { 409 l = m.Evidence.Size() 410 n += 1 + l + sovTx(uint64(l)) 411 } 412 if m.Validator != nil { 413 l = m.Validator.Size() 414 n += 1 + l + sovTx(uint64(l)) 415 } 416 if m.Abci != nil { 417 l = m.Abci.Size() 418 n += 1 + l + sovTx(uint64(l)) 419 } 420 return n 421 } 422 423 func (m *MsgUpdateParamsResponse) Size() (n int) { 424 if m == nil { 425 return 0 426 } 427 var l int 428 _ = l 429 return n 430 } 431 432 func sovTx(x uint64) (n int) { 433 return (math_bits.Len64(x|1) + 6) / 7 434 } 435 func sozTx(x uint64) (n int) { 436 return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 437 } 438 func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { 439 l := len(dAtA) 440 iNdEx := 0 441 for iNdEx < l { 442 preIndex := iNdEx 443 var wire uint64 444 for shift := uint(0); ; shift += 7 { 445 if shift >= 64 { 446 return ErrIntOverflowTx 447 } 448 if iNdEx >= l { 449 return io.ErrUnexpectedEOF 450 } 451 b := dAtA[iNdEx] 452 iNdEx++ 453 wire |= uint64(b&0x7F) << shift 454 if b < 0x80 { 455 break 456 } 457 } 458 fieldNum := int32(wire >> 3) 459 wireType := int(wire & 0x7) 460 if wireType == 4 { 461 return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") 462 } 463 if fieldNum <= 0 { 464 return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) 465 } 466 switch fieldNum { 467 case 1: 468 if wireType != 2 { 469 return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) 470 } 471 var stringLen uint64 472 for shift := uint(0); ; shift += 7 { 473 if shift >= 64 { 474 return ErrIntOverflowTx 475 } 476 if iNdEx >= l { 477 return io.ErrUnexpectedEOF 478 } 479 b := dAtA[iNdEx] 480 iNdEx++ 481 stringLen |= uint64(b&0x7F) << shift 482 if b < 0x80 { 483 break 484 } 485 } 486 intStringLen := int(stringLen) 487 if intStringLen < 0 { 488 return ErrInvalidLengthTx 489 } 490 postIndex := iNdEx + intStringLen 491 if postIndex < 0 { 492 return ErrInvalidLengthTx 493 } 494 if postIndex > l { 495 return io.ErrUnexpectedEOF 496 } 497 m.Authority = string(dAtA[iNdEx:postIndex]) 498 iNdEx = postIndex 499 case 2: 500 if wireType != 2 { 501 return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) 502 } 503 var msglen int 504 for shift := uint(0); ; shift += 7 { 505 if shift >= 64 { 506 return ErrIntOverflowTx 507 } 508 if iNdEx >= l { 509 return io.ErrUnexpectedEOF 510 } 511 b := dAtA[iNdEx] 512 iNdEx++ 513 msglen |= int(b&0x7F) << shift 514 if b < 0x80 { 515 break 516 } 517 } 518 if msglen < 0 { 519 return ErrInvalidLengthTx 520 } 521 postIndex := iNdEx + msglen 522 if postIndex < 0 { 523 return ErrInvalidLengthTx 524 } 525 if postIndex > l { 526 return io.ErrUnexpectedEOF 527 } 528 if m.Block == nil { 529 m.Block = &types.BlockParams{} 530 } 531 if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 532 return err 533 } 534 iNdEx = postIndex 535 case 3: 536 if wireType != 2 { 537 return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) 538 } 539 var msglen int 540 for shift := uint(0); ; shift += 7 { 541 if shift >= 64 { 542 return ErrIntOverflowTx 543 } 544 if iNdEx >= l { 545 return io.ErrUnexpectedEOF 546 } 547 b := dAtA[iNdEx] 548 iNdEx++ 549 msglen |= int(b&0x7F) << shift 550 if b < 0x80 { 551 break 552 } 553 } 554 if msglen < 0 { 555 return ErrInvalidLengthTx 556 } 557 postIndex := iNdEx + msglen 558 if postIndex < 0 { 559 return ErrInvalidLengthTx 560 } 561 if postIndex > l { 562 return io.ErrUnexpectedEOF 563 } 564 if m.Evidence == nil { 565 m.Evidence = &types.EvidenceParams{} 566 } 567 if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 568 return err 569 } 570 iNdEx = postIndex 571 case 4: 572 if wireType != 2 { 573 return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) 574 } 575 var msglen int 576 for shift := uint(0); ; shift += 7 { 577 if shift >= 64 { 578 return ErrIntOverflowTx 579 } 580 if iNdEx >= l { 581 return io.ErrUnexpectedEOF 582 } 583 b := dAtA[iNdEx] 584 iNdEx++ 585 msglen |= int(b&0x7F) << shift 586 if b < 0x80 { 587 break 588 } 589 } 590 if msglen < 0 { 591 return ErrInvalidLengthTx 592 } 593 postIndex := iNdEx + msglen 594 if postIndex < 0 { 595 return ErrInvalidLengthTx 596 } 597 if postIndex > l { 598 return io.ErrUnexpectedEOF 599 } 600 if m.Validator == nil { 601 m.Validator = &types.ValidatorParams{} 602 } 603 if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 604 return err 605 } 606 iNdEx = postIndex 607 case 5: 608 if wireType != 2 { 609 return fmt.Errorf("proto: wrong wireType = %d for field Abci", wireType) 610 } 611 var msglen int 612 for shift := uint(0); ; shift += 7 { 613 if shift >= 64 { 614 return ErrIntOverflowTx 615 } 616 if iNdEx >= l { 617 return io.ErrUnexpectedEOF 618 } 619 b := dAtA[iNdEx] 620 iNdEx++ 621 msglen |= int(b&0x7F) << shift 622 if b < 0x80 { 623 break 624 } 625 } 626 if msglen < 0 { 627 return ErrInvalidLengthTx 628 } 629 postIndex := iNdEx + msglen 630 if postIndex < 0 { 631 return ErrInvalidLengthTx 632 } 633 if postIndex > l { 634 return io.ErrUnexpectedEOF 635 } 636 if m.Abci == nil { 637 m.Abci = &types.ABCIParams{} 638 } 639 if err := m.Abci.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 640 return err 641 } 642 iNdEx = postIndex 643 default: 644 iNdEx = preIndex 645 skippy, err := skipTx(dAtA[iNdEx:]) 646 if err != nil { 647 return err 648 } 649 if (skippy < 0) || (iNdEx+skippy) < 0 { 650 return ErrInvalidLengthTx 651 } 652 if (iNdEx + skippy) > l { 653 return io.ErrUnexpectedEOF 654 } 655 iNdEx += skippy 656 } 657 } 658 659 if iNdEx > l { 660 return io.ErrUnexpectedEOF 661 } 662 return nil 663 } 664 func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { 665 l := len(dAtA) 666 iNdEx := 0 667 for iNdEx < l { 668 preIndex := iNdEx 669 var wire uint64 670 for shift := uint(0); ; shift += 7 { 671 if shift >= 64 { 672 return ErrIntOverflowTx 673 } 674 if iNdEx >= l { 675 return io.ErrUnexpectedEOF 676 } 677 b := dAtA[iNdEx] 678 iNdEx++ 679 wire |= uint64(b&0x7F) << shift 680 if b < 0x80 { 681 break 682 } 683 } 684 fieldNum := int32(wire >> 3) 685 wireType := int(wire & 0x7) 686 if wireType == 4 { 687 return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") 688 } 689 if fieldNum <= 0 { 690 return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 691 } 692 switch fieldNum { 693 default: 694 iNdEx = preIndex 695 skippy, err := skipTx(dAtA[iNdEx:]) 696 if err != nil { 697 return err 698 } 699 if (skippy < 0) || (iNdEx+skippy) < 0 { 700 return ErrInvalidLengthTx 701 } 702 if (iNdEx + skippy) > l { 703 return io.ErrUnexpectedEOF 704 } 705 iNdEx += skippy 706 } 707 } 708 709 if iNdEx > l { 710 return io.ErrUnexpectedEOF 711 } 712 return nil 713 } 714 func skipTx(dAtA []byte) (n int, err error) { 715 l := len(dAtA) 716 iNdEx := 0 717 depth := 0 718 for iNdEx < l { 719 var wire uint64 720 for shift := uint(0); ; shift += 7 { 721 if shift >= 64 { 722 return 0, ErrIntOverflowTx 723 } 724 if iNdEx >= l { 725 return 0, io.ErrUnexpectedEOF 726 } 727 b := dAtA[iNdEx] 728 iNdEx++ 729 wire |= (uint64(b) & 0x7F) << shift 730 if b < 0x80 { 731 break 732 } 733 } 734 wireType := int(wire & 0x7) 735 switch wireType { 736 case 0: 737 for shift := uint(0); ; shift += 7 { 738 if shift >= 64 { 739 return 0, ErrIntOverflowTx 740 } 741 if iNdEx >= l { 742 return 0, io.ErrUnexpectedEOF 743 } 744 iNdEx++ 745 if dAtA[iNdEx-1] < 0x80 { 746 break 747 } 748 } 749 case 1: 750 iNdEx += 8 751 case 2: 752 var length int 753 for shift := uint(0); ; shift += 7 { 754 if shift >= 64 { 755 return 0, ErrIntOverflowTx 756 } 757 if iNdEx >= l { 758 return 0, io.ErrUnexpectedEOF 759 } 760 b := dAtA[iNdEx] 761 iNdEx++ 762 length |= (int(b) & 0x7F) << shift 763 if b < 0x80 { 764 break 765 } 766 } 767 if length < 0 { 768 return 0, ErrInvalidLengthTx 769 } 770 iNdEx += length 771 case 3: 772 depth++ 773 case 4: 774 if depth == 0 { 775 return 0, ErrUnexpectedEndOfGroupTx 776 } 777 depth-- 778 case 5: 779 iNdEx += 4 780 default: 781 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 782 } 783 if iNdEx < 0 { 784 return 0, ErrInvalidLengthTx 785 } 786 if depth == 0 { 787 return iNdEx, nil 788 } 789 } 790 return 0, io.ErrUnexpectedEOF 791 } 792 793 var ( 794 ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") 795 ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") 796 ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") 797 )