github.com/adoriasoft/tendermint@v0.34.0-dev1.0.20200722151356-96d84601a75a/proto/tendermint/privval/types.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: tendermint/privval/types.proto 3 4 package privval 5 6 import ( 7 fmt "fmt" 8 crypto "github.com/adoriasoft/tendermint/proto/tendermint/crypto" 9 types "github.com/adoriasoft/tendermint/proto/tendermint/types" 10 _ "github.com/gogo/protobuf/gogoproto" 11 proto "github.com/gogo/protobuf/proto" 12 io "io" 13 math "math" 14 math_bits "math/bits" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = fmt.Errorf 20 var _ = math.Inf 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the proto package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // proto package needs to be updated. 26 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 27 28 type Errors int32 29 30 const ( 31 Errors_ERRORS_UNKNOWN Errors = 0 32 Errors_ERRORS_UNEXPECTED_RESPONSE Errors = 1 33 Errors_ERRORS_NO_CONNECTION Errors = 2 34 Errors_ERRORS_CONNECTION_TIMEOUT Errors = 3 35 Errors_ERRORS_READ_TIMEOUT Errors = 4 36 Errors_ERRORS_WRITE_TIMEOUT Errors = 5 37 ) 38 39 var Errors_name = map[int32]string{ 40 0: "ERRORS_UNKNOWN", 41 1: "ERRORS_UNEXPECTED_RESPONSE", 42 2: "ERRORS_NO_CONNECTION", 43 3: "ERRORS_CONNECTION_TIMEOUT", 44 4: "ERRORS_READ_TIMEOUT", 45 5: "ERRORS_WRITE_TIMEOUT", 46 } 47 48 var Errors_value = map[string]int32{ 49 "ERRORS_UNKNOWN": 0, 50 "ERRORS_UNEXPECTED_RESPONSE": 1, 51 "ERRORS_NO_CONNECTION": 2, 52 "ERRORS_CONNECTION_TIMEOUT": 3, 53 "ERRORS_READ_TIMEOUT": 4, 54 "ERRORS_WRITE_TIMEOUT": 5, 55 } 56 57 func (x Errors) String() string { 58 return proto.EnumName(Errors_name, int32(x)) 59 } 60 61 func (Errors) EnumDescriptor() ([]byte, []int) { 62 return fileDescriptor_cb4e437a5328cf9c, []int{0} 63 } 64 65 type RemoteSignerError struct { 66 Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` 67 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 68 } 69 70 func (m *RemoteSignerError) Reset() { *m = RemoteSignerError{} } 71 func (m *RemoteSignerError) String() string { return proto.CompactTextString(m) } 72 func (*RemoteSignerError) ProtoMessage() {} 73 func (*RemoteSignerError) Descriptor() ([]byte, []int) { 74 return fileDescriptor_cb4e437a5328cf9c, []int{0} 75 } 76 func (m *RemoteSignerError) XXX_Unmarshal(b []byte) error { 77 return m.Unmarshal(b) 78 } 79 func (m *RemoteSignerError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 80 if deterministic { 81 return xxx_messageInfo_RemoteSignerError.Marshal(b, m, deterministic) 82 } else { 83 b = b[:cap(b)] 84 n, err := m.MarshalToSizedBuffer(b) 85 if err != nil { 86 return nil, err 87 } 88 return b[:n], nil 89 } 90 } 91 func (m *RemoteSignerError) XXX_Merge(src proto.Message) { 92 xxx_messageInfo_RemoteSignerError.Merge(m, src) 93 } 94 func (m *RemoteSignerError) XXX_Size() int { 95 return m.Size() 96 } 97 func (m *RemoteSignerError) XXX_DiscardUnknown() { 98 xxx_messageInfo_RemoteSignerError.DiscardUnknown(m) 99 } 100 101 var xxx_messageInfo_RemoteSignerError proto.InternalMessageInfo 102 103 func (m *RemoteSignerError) GetCode() int32 { 104 if m != nil { 105 return m.Code 106 } 107 return 0 108 } 109 110 func (m *RemoteSignerError) GetDescription() string { 111 if m != nil { 112 return m.Description 113 } 114 return "" 115 } 116 117 // PubKeyRequest requests the consensus public key from the remote signer. 118 type PubKeyRequest struct { 119 } 120 121 func (m *PubKeyRequest) Reset() { *m = PubKeyRequest{} } 122 func (m *PubKeyRequest) String() string { return proto.CompactTextString(m) } 123 func (*PubKeyRequest) ProtoMessage() {} 124 func (*PubKeyRequest) Descriptor() ([]byte, []int) { 125 return fileDescriptor_cb4e437a5328cf9c, []int{1} 126 } 127 func (m *PubKeyRequest) XXX_Unmarshal(b []byte) error { 128 return m.Unmarshal(b) 129 } 130 func (m *PubKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 131 if deterministic { 132 return xxx_messageInfo_PubKeyRequest.Marshal(b, m, deterministic) 133 } else { 134 b = b[:cap(b)] 135 n, err := m.MarshalToSizedBuffer(b) 136 if err != nil { 137 return nil, err 138 } 139 return b[:n], nil 140 } 141 } 142 func (m *PubKeyRequest) XXX_Merge(src proto.Message) { 143 xxx_messageInfo_PubKeyRequest.Merge(m, src) 144 } 145 func (m *PubKeyRequest) XXX_Size() int { 146 return m.Size() 147 } 148 func (m *PubKeyRequest) XXX_DiscardUnknown() { 149 xxx_messageInfo_PubKeyRequest.DiscardUnknown(m) 150 } 151 152 var xxx_messageInfo_PubKeyRequest proto.InternalMessageInfo 153 154 // PubKeyResponse is a response message containing the public key. 155 type PubKeyResponse struct { 156 PubKey *crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` 157 Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` 158 } 159 160 func (m *PubKeyResponse) Reset() { *m = PubKeyResponse{} } 161 func (m *PubKeyResponse) String() string { return proto.CompactTextString(m) } 162 func (*PubKeyResponse) ProtoMessage() {} 163 func (*PubKeyResponse) Descriptor() ([]byte, []int) { 164 return fileDescriptor_cb4e437a5328cf9c, []int{2} 165 } 166 func (m *PubKeyResponse) XXX_Unmarshal(b []byte) error { 167 return m.Unmarshal(b) 168 } 169 func (m *PubKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 170 if deterministic { 171 return xxx_messageInfo_PubKeyResponse.Marshal(b, m, deterministic) 172 } else { 173 b = b[:cap(b)] 174 n, err := m.MarshalToSizedBuffer(b) 175 if err != nil { 176 return nil, err 177 } 178 return b[:n], nil 179 } 180 } 181 func (m *PubKeyResponse) XXX_Merge(src proto.Message) { 182 xxx_messageInfo_PubKeyResponse.Merge(m, src) 183 } 184 func (m *PubKeyResponse) XXX_Size() int { 185 return m.Size() 186 } 187 func (m *PubKeyResponse) XXX_DiscardUnknown() { 188 xxx_messageInfo_PubKeyResponse.DiscardUnknown(m) 189 } 190 191 var xxx_messageInfo_PubKeyResponse proto.InternalMessageInfo 192 193 func (m *PubKeyResponse) GetPubKey() *crypto.PublicKey { 194 if m != nil { 195 return m.PubKey 196 } 197 return nil 198 } 199 200 func (m *PubKeyResponse) GetError() *RemoteSignerError { 201 if m != nil { 202 return m.Error 203 } 204 return nil 205 } 206 207 // SignVoteRequest is a request to sign a vote 208 type SignVoteRequest struct { 209 Vote *types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` 210 } 211 212 func (m *SignVoteRequest) Reset() { *m = SignVoteRequest{} } 213 func (m *SignVoteRequest) String() string { return proto.CompactTextString(m) } 214 func (*SignVoteRequest) ProtoMessage() {} 215 func (*SignVoteRequest) Descriptor() ([]byte, []int) { 216 return fileDescriptor_cb4e437a5328cf9c, []int{3} 217 } 218 func (m *SignVoteRequest) XXX_Unmarshal(b []byte) error { 219 return m.Unmarshal(b) 220 } 221 func (m *SignVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 222 if deterministic { 223 return xxx_messageInfo_SignVoteRequest.Marshal(b, m, deterministic) 224 } else { 225 b = b[:cap(b)] 226 n, err := m.MarshalToSizedBuffer(b) 227 if err != nil { 228 return nil, err 229 } 230 return b[:n], nil 231 } 232 } 233 func (m *SignVoteRequest) XXX_Merge(src proto.Message) { 234 xxx_messageInfo_SignVoteRequest.Merge(m, src) 235 } 236 func (m *SignVoteRequest) XXX_Size() int { 237 return m.Size() 238 } 239 func (m *SignVoteRequest) XXX_DiscardUnknown() { 240 xxx_messageInfo_SignVoteRequest.DiscardUnknown(m) 241 } 242 243 var xxx_messageInfo_SignVoteRequest proto.InternalMessageInfo 244 245 func (m *SignVoteRequest) GetVote() *types.Vote { 246 if m != nil { 247 return m.Vote 248 } 249 return nil 250 } 251 252 // SignedVoteResponse is a response containing a signed vote or an error 253 type SignedVoteResponse struct { 254 Vote *types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` 255 Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` 256 } 257 258 func (m *SignedVoteResponse) Reset() { *m = SignedVoteResponse{} } 259 func (m *SignedVoteResponse) String() string { return proto.CompactTextString(m) } 260 func (*SignedVoteResponse) ProtoMessage() {} 261 func (*SignedVoteResponse) Descriptor() ([]byte, []int) { 262 return fileDescriptor_cb4e437a5328cf9c, []int{4} 263 } 264 func (m *SignedVoteResponse) XXX_Unmarshal(b []byte) error { 265 return m.Unmarshal(b) 266 } 267 func (m *SignedVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 268 if deterministic { 269 return xxx_messageInfo_SignedVoteResponse.Marshal(b, m, deterministic) 270 } else { 271 b = b[:cap(b)] 272 n, err := m.MarshalToSizedBuffer(b) 273 if err != nil { 274 return nil, err 275 } 276 return b[:n], nil 277 } 278 } 279 func (m *SignedVoteResponse) XXX_Merge(src proto.Message) { 280 xxx_messageInfo_SignedVoteResponse.Merge(m, src) 281 } 282 func (m *SignedVoteResponse) XXX_Size() int { 283 return m.Size() 284 } 285 func (m *SignedVoteResponse) XXX_DiscardUnknown() { 286 xxx_messageInfo_SignedVoteResponse.DiscardUnknown(m) 287 } 288 289 var xxx_messageInfo_SignedVoteResponse proto.InternalMessageInfo 290 291 func (m *SignedVoteResponse) GetVote() *types.Vote { 292 if m != nil { 293 return m.Vote 294 } 295 return nil 296 } 297 298 func (m *SignedVoteResponse) GetError() *RemoteSignerError { 299 if m != nil { 300 return m.Error 301 } 302 return nil 303 } 304 305 // SignProposalRequest is a request to sign a proposal 306 type SignProposalRequest struct { 307 Proposal types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"` 308 } 309 310 func (m *SignProposalRequest) Reset() { *m = SignProposalRequest{} } 311 func (m *SignProposalRequest) String() string { return proto.CompactTextString(m) } 312 func (*SignProposalRequest) ProtoMessage() {} 313 func (*SignProposalRequest) Descriptor() ([]byte, []int) { 314 return fileDescriptor_cb4e437a5328cf9c, []int{5} 315 } 316 func (m *SignProposalRequest) XXX_Unmarshal(b []byte) error { 317 return m.Unmarshal(b) 318 } 319 func (m *SignProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 320 if deterministic { 321 return xxx_messageInfo_SignProposalRequest.Marshal(b, m, deterministic) 322 } else { 323 b = b[:cap(b)] 324 n, err := m.MarshalToSizedBuffer(b) 325 if err != nil { 326 return nil, err 327 } 328 return b[:n], nil 329 } 330 } 331 func (m *SignProposalRequest) XXX_Merge(src proto.Message) { 332 xxx_messageInfo_SignProposalRequest.Merge(m, src) 333 } 334 func (m *SignProposalRequest) XXX_Size() int { 335 return m.Size() 336 } 337 func (m *SignProposalRequest) XXX_DiscardUnknown() { 338 xxx_messageInfo_SignProposalRequest.DiscardUnknown(m) 339 } 340 341 var xxx_messageInfo_SignProposalRequest proto.InternalMessageInfo 342 343 func (m *SignProposalRequest) GetProposal() types.Proposal { 344 if m != nil { 345 return m.Proposal 346 } 347 return types.Proposal{} 348 } 349 350 // SignedProposalResponse is response containing a signed proposal or an error 351 type SignedProposalResponse struct { 352 Proposal *types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` 353 Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` 354 } 355 356 func (m *SignedProposalResponse) Reset() { *m = SignedProposalResponse{} } 357 func (m *SignedProposalResponse) String() string { return proto.CompactTextString(m) } 358 func (*SignedProposalResponse) ProtoMessage() {} 359 func (*SignedProposalResponse) Descriptor() ([]byte, []int) { 360 return fileDescriptor_cb4e437a5328cf9c, []int{6} 361 } 362 func (m *SignedProposalResponse) XXX_Unmarshal(b []byte) error { 363 return m.Unmarshal(b) 364 } 365 func (m *SignedProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 366 if deterministic { 367 return xxx_messageInfo_SignedProposalResponse.Marshal(b, m, deterministic) 368 } else { 369 b = b[:cap(b)] 370 n, err := m.MarshalToSizedBuffer(b) 371 if err != nil { 372 return nil, err 373 } 374 return b[:n], nil 375 } 376 } 377 func (m *SignedProposalResponse) XXX_Merge(src proto.Message) { 378 xxx_messageInfo_SignedProposalResponse.Merge(m, src) 379 } 380 func (m *SignedProposalResponse) XXX_Size() int { 381 return m.Size() 382 } 383 func (m *SignedProposalResponse) XXX_DiscardUnknown() { 384 xxx_messageInfo_SignedProposalResponse.DiscardUnknown(m) 385 } 386 387 var xxx_messageInfo_SignedProposalResponse proto.InternalMessageInfo 388 389 func (m *SignedProposalResponse) GetProposal() *types.Proposal { 390 if m != nil { 391 return m.Proposal 392 } 393 return nil 394 } 395 396 func (m *SignedProposalResponse) GetError() *RemoteSignerError { 397 if m != nil { 398 return m.Error 399 } 400 return nil 401 } 402 403 // PingRequest is a request to confirm that the connection is alive. 404 type PingRequest struct { 405 } 406 407 func (m *PingRequest) Reset() { *m = PingRequest{} } 408 func (m *PingRequest) String() string { return proto.CompactTextString(m) } 409 func (*PingRequest) ProtoMessage() {} 410 func (*PingRequest) Descriptor() ([]byte, []int) { 411 return fileDescriptor_cb4e437a5328cf9c, []int{7} 412 } 413 func (m *PingRequest) XXX_Unmarshal(b []byte) error { 414 return m.Unmarshal(b) 415 } 416 func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 417 if deterministic { 418 return xxx_messageInfo_PingRequest.Marshal(b, m, deterministic) 419 } else { 420 b = b[:cap(b)] 421 n, err := m.MarshalToSizedBuffer(b) 422 if err != nil { 423 return nil, err 424 } 425 return b[:n], nil 426 } 427 } 428 func (m *PingRequest) XXX_Merge(src proto.Message) { 429 xxx_messageInfo_PingRequest.Merge(m, src) 430 } 431 func (m *PingRequest) XXX_Size() int { 432 return m.Size() 433 } 434 func (m *PingRequest) XXX_DiscardUnknown() { 435 xxx_messageInfo_PingRequest.DiscardUnknown(m) 436 } 437 438 var xxx_messageInfo_PingRequest proto.InternalMessageInfo 439 440 // PingResponse is a response to confirm that the connection is alive. 441 type PingResponse struct { 442 } 443 444 func (m *PingResponse) Reset() { *m = PingResponse{} } 445 func (m *PingResponse) String() string { return proto.CompactTextString(m) } 446 func (*PingResponse) ProtoMessage() {} 447 func (*PingResponse) Descriptor() ([]byte, []int) { 448 return fileDescriptor_cb4e437a5328cf9c, []int{8} 449 } 450 func (m *PingResponse) XXX_Unmarshal(b []byte) error { 451 return m.Unmarshal(b) 452 } 453 func (m *PingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 454 if deterministic { 455 return xxx_messageInfo_PingResponse.Marshal(b, m, deterministic) 456 } else { 457 b = b[:cap(b)] 458 n, err := m.MarshalToSizedBuffer(b) 459 if err != nil { 460 return nil, err 461 } 462 return b[:n], nil 463 } 464 } 465 func (m *PingResponse) XXX_Merge(src proto.Message) { 466 xxx_messageInfo_PingResponse.Merge(m, src) 467 } 468 func (m *PingResponse) XXX_Size() int { 469 return m.Size() 470 } 471 func (m *PingResponse) XXX_DiscardUnknown() { 472 xxx_messageInfo_PingResponse.DiscardUnknown(m) 473 } 474 475 var xxx_messageInfo_PingResponse proto.InternalMessageInfo 476 477 type Message struct { 478 // Types that are valid to be assigned to Sum: 479 // *Message_PubKeyRequest 480 // *Message_PubKeyResponse 481 // *Message_SignVoteRequest 482 // *Message_SignedVoteResponse 483 // *Message_SignProposalRequest 484 // *Message_SignedProposalResponse 485 // *Message_PingRequest 486 // *Message_PingResponse 487 Sum isMessage_Sum `protobuf_oneof:"sum"` 488 } 489 490 func (m *Message) Reset() { *m = Message{} } 491 func (m *Message) String() string { return proto.CompactTextString(m) } 492 func (*Message) ProtoMessage() {} 493 func (*Message) Descriptor() ([]byte, []int) { 494 return fileDescriptor_cb4e437a5328cf9c, []int{9} 495 } 496 func (m *Message) XXX_Unmarshal(b []byte) error { 497 return m.Unmarshal(b) 498 } 499 func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 500 if deterministic { 501 return xxx_messageInfo_Message.Marshal(b, m, deterministic) 502 } else { 503 b = b[:cap(b)] 504 n, err := m.MarshalToSizedBuffer(b) 505 if err != nil { 506 return nil, err 507 } 508 return b[:n], nil 509 } 510 } 511 func (m *Message) XXX_Merge(src proto.Message) { 512 xxx_messageInfo_Message.Merge(m, src) 513 } 514 func (m *Message) XXX_Size() int { 515 return m.Size() 516 } 517 func (m *Message) XXX_DiscardUnknown() { 518 xxx_messageInfo_Message.DiscardUnknown(m) 519 } 520 521 var xxx_messageInfo_Message proto.InternalMessageInfo 522 523 type isMessage_Sum interface { 524 isMessage_Sum() 525 MarshalTo([]byte) (int, error) 526 Size() int 527 } 528 529 type Message_PubKeyRequest struct { 530 PubKeyRequest *PubKeyRequest `protobuf:"bytes,1,opt,name=pub_key_request,json=pubKeyRequest,proto3,oneof" json:"pub_key_request,omitempty"` 531 } 532 type Message_PubKeyResponse struct { 533 PubKeyResponse *PubKeyResponse `protobuf:"bytes,2,opt,name=pub_key_response,json=pubKeyResponse,proto3,oneof" json:"pub_key_response,omitempty"` 534 } 535 type Message_SignVoteRequest struct { 536 SignVoteRequest *SignVoteRequest `protobuf:"bytes,3,opt,name=sign_vote_request,json=signVoteRequest,proto3,oneof" json:"sign_vote_request,omitempty"` 537 } 538 type Message_SignedVoteResponse struct { 539 SignedVoteResponse *SignedVoteResponse `protobuf:"bytes,4,opt,name=signed_vote_response,json=signedVoteResponse,proto3,oneof" json:"signed_vote_response,omitempty"` 540 } 541 type Message_SignProposalRequest struct { 542 SignProposalRequest *SignProposalRequest `protobuf:"bytes,5,opt,name=sign_proposal_request,json=signProposalRequest,proto3,oneof" json:"sign_proposal_request,omitempty"` 543 } 544 type Message_SignedProposalResponse struct { 545 SignedProposalResponse *SignedProposalResponse `protobuf:"bytes,6,opt,name=signed_proposal_response,json=signedProposalResponse,proto3,oneof" json:"signed_proposal_response,omitempty"` 546 } 547 type Message_PingRequest struct { 548 PingRequest *PingRequest `protobuf:"bytes,7,opt,name=ping_request,json=pingRequest,proto3,oneof" json:"ping_request,omitempty"` 549 } 550 type Message_PingResponse struct { 551 PingResponse *PingResponse `protobuf:"bytes,8,opt,name=ping_response,json=pingResponse,proto3,oneof" json:"ping_response,omitempty"` 552 } 553 554 func (*Message_PubKeyRequest) isMessage_Sum() {} 555 func (*Message_PubKeyResponse) isMessage_Sum() {} 556 func (*Message_SignVoteRequest) isMessage_Sum() {} 557 func (*Message_SignedVoteResponse) isMessage_Sum() {} 558 func (*Message_SignProposalRequest) isMessage_Sum() {} 559 func (*Message_SignedProposalResponse) isMessage_Sum() {} 560 func (*Message_PingRequest) isMessage_Sum() {} 561 func (*Message_PingResponse) isMessage_Sum() {} 562 563 func (m *Message) GetSum() isMessage_Sum { 564 if m != nil { 565 return m.Sum 566 } 567 return nil 568 } 569 570 func (m *Message) GetPubKeyRequest() *PubKeyRequest { 571 if x, ok := m.GetSum().(*Message_PubKeyRequest); ok { 572 return x.PubKeyRequest 573 } 574 return nil 575 } 576 577 func (m *Message) GetPubKeyResponse() *PubKeyResponse { 578 if x, ok := m.GetSum().(*Message_PubKeyResponse); ok { 579 return x.PubKeyResponse 580 } 581 return nil 582 } 583 584 func (m *Message) GetSignVoteRequest() *SignVoteRequest { 585 if x, ok := m.GetSum().(*Message_SignVoteRequest); ok { 586 return x.SignVoteRequest 587 } 588 return nil 589 } 590 591 func (m *Message) GetSignedVoteResponse() *SignedVoteResponse { 592 if x, ok := m.GetSum().(*Message_SignedVoteResponse); ok { 593 return x.SignedVoteResponse 594 } 595 return nil 596 } 597 598 func (m *Message) GetSignProposalRequest() *SignProposalRequest { 599 if x, ok := m.GetSum().(*Message_SignProposalRequest); ok { 600 return x.SignProposalRequest 601 } 602 return nil 603 } 604 605 func (m *Message) GetSignedProposalResponse() *SignedProposalResponse { 606 if x, ok := m.GetSum().(*Message_SignedProposalResponse); ok { 607 return x.SignedProposalResponse 608 } 609 return nil 610 } 611 612 func (m *Message) GetPingRequest() *PingRequest { 613 if x, ok := m.GetSum().(*Message_PingRequest); ok { 614 return x.PingRequest 615 } 616 return nil 617 } 618 619 func (m *Message) GetPingResponse() *PingResponse { 620 if x, ok := m.GetSum().(*Message_PingResponse); ok { 621 return x.PingResponse 622 } 623 return nil 624 } 625 626 // XXX_OneofWrappers is for the internal use of the proto package. 627 func (*Message) XXX_OneofWrappers() []interface{} { 628 return []interface{}{ 629 (*Message_PubKeyRequest)(nil), 630 (*Message_PubKeyResponse)(nil), 631 (*Message_SignVoteRequest)(nil), 632 (*Message_SignedVoteResponse)(nil), 633 (*Message_SignProposalRequest)(nil), 634 (*Message_SignedProposalResponse)(nil), 635 (*Message_PingRequest)(nil), 636 (*Message_PingResponse)(nil), 637 } 638 } 639 640 func init() { 641 proto.RegisterEnum("tendermint.privval.Errors", Errors_name, Errors_value) 642 proto.RegisterType((*RemoteSignerError)(nil), "tendermint.privval.RemoteSignerError") 643 proto.RegisterType((*PubKeyRequest)(nil), "tendermint.privval.PubKeyRequest") 644 proto.RegisterType((*PubKeyResponse)(nil), "tendermint.privval.PubKeyResponse") 645 proto.RegisterType((*SignVoteRequest)(nil), "tendermint.privval.SignVoteRequest") 646 proto.RegisterType((*SignedVoteResponse)(nil), "tendermint.privval.SignedVoteResponse") 647 proto.RegisterType((*SignProposalRequest)(nil), "tendermint.privval.SignProposalRequest") 648 proto.RegisterType((*SignedProposalResponse)(nil), "tendermint.privval.SignedProposalResponse") 649 proto.RegisterType((*PingRequest)(nil), "tendermint.privval.PingRequest") 650 proto.RegisterType((*PingResponse)(nil), "tendermint.privval.PingResponse") 651 proto.RegisterType((*Message)(nil), "tendermint.privval.Message") 652 } 653 654 func init() { proto.RegisterFile("tendermint/privval/types.proto", fileDescriptor_cb4e437a5328cf9c) } 655 656 var fileDescriptor_cb4e437a5328cf9c = []byte{ 657 // 724 bytes of a gzipped FileDescriptorProto 658 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x4d, 0x4f, 0x13, 0x41, 659 0x18, 0xc7, 0x77, 0xa1, 0x2d, 0xf8, 0x94, 0xbe, 0x30, 0x20, 0xd6, 0x06, 0x97, 0xba, 0x46, 0x25, 660 0x1c, 0xda, 0x04, 0xa3, 0x89, 0x51, 0x0f, 0x02, 0x1b, 0xdb, 0x10, 0xb6, 0x75, 0x5a, 0xc4, 0x90, 661 0x98, 0xa6, 0x2f, 0xc3, 0xba, 0x81, 0xee, 0x8c, 0x3b, 0x5b, 0x92, 0x1e, 0xbc, 0x79, 0x35, 0xf1, 662 0x63, 0x78, 0xf6, 0x53, 0x70, 0xe4, 0xe8, 0xc9, 0x18, 0xf8, 0x22, 0xa6, 0xb3, 0xd3, 0xed, 0xf6, 663 0xcd, 0x84, 0x70, 0xdb, 0x79, 0xfe, 0x33, 0xbf, 0xe7, 0xff, 0xec, 0xfc, 0x93, 0x01, 0xcd, 0x23, 664 0x4e, 0x9b, 0xb8, 0x1d, 0xdb, 0xf1, 0x0a, 0xcc, 0xb5, 0xcf, 0xcf, 0x1b, 0x67, 0x05, 0xaf, 0xc7, 665 0x08, 0xcf, 0x33, 0x97, 0x7a, 0x14, 0xa1, 0xa1, 0x9e, 0x97, 0x7a, 0x76, 0xd5, 0xa2, 0x16, 0x15, 666 0x72, 0xa1, 0xff, 0xe5, 0xef, 0xcc, 0xae, 0x87, 0x48, 0x2d, 0xb7, 0xc7, 0x3c, 0x5a, 0x38, 0x25, 667 0x3d, 0x3e, 0x45, 0x15, 0xfc, 0x70, 0x17, 0xbd, 0x04, 0xcb, 0x98, 0x74, 0xa8, 0x47, 0xaa, 0xb6, 668 0xe5, 0x10, 0xd7, 0x70, 0x5d, 0xea, 0x22, 0x04, 0x91, 0x16, 0x6d, 0x93, 0x8c, 0x9a, 0x53, 0x37, 669 0xa3, 0x58, 0x7c, 0xa3, 0x1c, 0xc4, 0xdb, 0x84, 0xb7, 0x5c, 0x9b, 0x79, 0x36, 0x75, 0x32, 0x73, 670 0x39, 0x75, 0xf3, 0x0e, 0x0e, 0x97, 0xf4, 0x14, 0x24, 0x2a, 0xdd, 0xe6, 0x3e, 0xe9, 0x61, 0xf2, 671 0xa5, 0x4b, 0xb8, 0xa7, 0x7f, 0x53, 0x21, 0x39, 0xa8, 0x70, 0x46, 0x1d, 0x4e, 0xd0, 0x73, 0x58, 672 0x60, 0xdd, 0x66, 0xfd, 0x94, 0xf4, 0x04, 0x3c, 0xbe, 0xbd, 0x9e, 0x0f, 0x8d, 0xe9, 0x9b, 0xcf, 673 0x57, 0xba, 0xcd, 0x33, 0xbb, 0xd5, 0x3f, 0x16, 0x63, 0xe2, 0x38, 0x7a, 0x05, 0x51, 0xd2, 0x77, 674 0x26, 0xda, 0xc6, 0xb7, 0x1f, 0xe7, 0x27, 0xff, 0x4d, 0x7e, 0x62, 0x0c, 0xec, 0x9f, 0xd1, 0xdf, 675 0x40, 0xaa, 0x5f, 0xfd, 0x40, 0x3d, 0x22, 0x9d, 0xa1, 0x2d, 0x88, 0x9c, 0x53, 0x8f, 0x48, 0x0f, 676 0x6b, 0x61, 0x9c, 0xff, 0x73, 0xc4, 0x66, 0xb1, 0x47, 0xff, 0x0a, 0x48, 0x40, 0xdb, 0x3e, 0x40, 677 0x0e, 0x72, 0x03, 0xc2, 0xed, 0xdc, 0x57, 0x61, 0xa5, 0x5f, 0xad, 0xb8, 0x94, 0x51, 0xde, 0x38, 678 0x1b, 0x4c, 0xf0, 0x1a, 0x16, 0x99, 0x2c, 0x49, 0x0f, 0xd9, 0x49, 0x0f, 0x83, 0x43, 0x3b, 0x91, 679 0x8b, 0x3f, 0x1b, 0x0a, 0x0e, 0x4e, 0xe8, 0xdf, 0x55, 0x58, 0xf3, 0x87, 0x1a, 0x72, 0xe5, 0x60, 680 0x2f, 0x6e, 0x02, 0x1e, 0x22, 0x6f, 0x37, 0x64, 0x02, 0xe2, 0x15, 0xdb, 0xb1, 0x06, 0xc1, 0x49, 681 0xc2, 0x92, 0xbf, 0xf4, 0x3d, 0xe9, 0xbf, 0xa2, 0xb0, 0x70, 0x40, 0x38, 0x6f, 0x58, 0x04, 0xed, 682 0x43, 0x4a, 0x26, 0xa8, 0xee, 0xfa, 0xdb, 0xa5, 0xcd, 0x87, 0xd3, 0x3a, 0x8e, 0x04, 0xb2, 0xa8, 683 0xe0, 0x04, 0x0b, 0x17, 0x90, 0x09, 0xe9, 0x21, 0xcc, 0x6f, 0x26, 0xfd, 0xeb, 0xff, 0xa3, 0xf9, 684 0x3b, 0x8b, 0x0a, 0x4e, 0xb2, 0xd1, 0x78, 0xbf, 0x87, 0x65, 0x6e, 0x5b, 0x4e, 0xbd, 0x7f, 0xed, 685 0x81, 0xbd, 0x79, 0x01, 0x7c, 0x34, 0x0d, 0x38, 0x96, 0xcb, 0xa2, 0x82, 0x53, 0x7c, 0x2c, 0xaa, 686 0xc7, 0xb0, 0xca, 0xc5, 0x4d, 0x0d, 0xa0, 0xd2, 0x66, 0x44, 0x50, 0x9f, 0xcc, 0xa2, 0x8e, 0xc6, 687 0xb5, 0xa8, 0x60, 0xc4, 0x27, 0x43, 0xfc, 0x09, 0xee, 0x0a, 0xbb, 0x83, 0x4b, 0x0c, 0x2c, 0x47, 688 0x05, 0xfc, 0xe9, 0x2c, 0xf8, 0x58, 0x18, 0x8b, 0x0a, 0x5e, 0xe1, 0x53, 0x32, 0x7a, 0x02, 0x19, 689 0x69, 0x3d, 0xd4, 0x40, 0xda, 0x8f, 0x89, 0x0e, 0x5b, 0xb3, 0xed, 0x8f, 0x07, 0xb3, 0xa8, 0xe0, 690 0x35, 0x3e, 0x3d, 0xb2, 0x7b, 0xb0, 0xc4, 0x6c, 0xc7, 0x0a, 0xdc, 0x2f, 0x08, 0xf6, 0xc6, 0xd4, 691 0x1b, 0x1c, 0xa6, 0xac, 0xa8, 0xe0, 0x38, 0x1b, 0x2e, 0xd1, 0x3b, 0x48, 0x48, 0x8a, 0xb4, 0xb8, 692 0x28, 0x30, 0xb9, 0xd9, 0x98, 0xc0, 0xd8, 0x12, 0x0b, 0xad, 0x77, 0xa2, 0x30, 0xcf, 0xbb, 0x9d, 693 0xad, 0x9f, 0x2a, 0xc4, 0x44, 0xc8, 0x39, 0x42, 0x90, 0x34, 0x30, 0x2e, 0xe3, 0x6a, 0xfd, 0xd0, 694 0xdc, 0x37, 0xcb, 0x47, 0x66, 0x5a, 0x41, 0x1a, 0x64, 0x83, 0x9a, 0xf1, 0xb1, 0x62, 0xec, 0xd6, 695 0x8c, 0xbd, 0x3a, 0x36, 0xaa, 0x95, 0xb2, 0x59, 0x35, 0xd2, 0x2a, 0xca, 0xc0, 0xaa, 0xd4, 0xcd, 696 0x72, 0x7d, 0xb7, 0x6c, 0x9a, 0xc6, 0x6e, 0xad, 0x54, 0x36, 0xd3, 0x73, 0xe8, 0x01, 0xdc, 0x97, 697 0xca, 0xb0, 0x5c, 0xaf, 0x95, 0x0e, 0x8c, 0xf2, 0x61, 0x2d, 0x3d, 0x8f, 0xee, 0xc1, 0x8a, 0x94, 698 0xb1, 0xf1, 0x76, 0x2f, 0x10, 0x22, 0x21, 0xe2, 0x11, 0x2e, 0xd5, 0x8c, 0x40, 0x89, 0xee, 0x54, 699 0x2f, 0xae, 0x34, 0xf5, 0xf2, 0x4a, 0x53, 0xff, 0x5e, 0x69, 0xea, 0x8f, 0x6b, 0x4d, 0xb9, 0xbc, 700 0xd6, 0x94, 0xdf, 0xd7, 0x9a, 0x72, 0xfc, 0xd2, 0xb2, 0xbd, 0xcf, 0xdd, 0x66, 0xbe, 0x45, 0x3b, 701 0x85, 0x46, 0x9b, 0xba, 0x76, 0x83, 0xd3, 0x13, 0xaf, 0x30, 0xf2, 0x74, 0xf5, 0x5f, 0xa3, 0xc9, 702 0xb7, 0xac, 0x19, 0x13, 0xca, 0xb3, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa6, 0x11, 0x65, 0x61, 703 0xe8, 0x06, 0x00, 0x00, 704 } 705 706 func (m *RemoteSignerError) Marshal() (dAtA []byte, err error) { 707 size := m.Size() 708 dAtA = make([]byte, size) 709 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 710 if err != nil { 711 return nil, err 712 } 713 return dAtA[:n], nil 714 } 715 716 func (m *RemoteSignerError) MarshalTo(dAtA []byte) (int, error) { 717 size := m.Size() 718 return m.MarshalToSizedBuffer(dAtA[:size]) 719 } 720 721 func (m *RemoteSignerError) MarshalToSizedBuffer(dAtA []byte) (int, error) { 722 i := len(dAtA) 723 _ = i 724 var l int 725 _ = l 726 if len(m.Description) > 0 { 727 i -= len(m.Description) 728 copy(dAtA[i:], m.Description) 729 i = encodeVarintTypes(dAtA, i, uint64(len(m.Description))) 730 i-- 731 dAtA[i] = 0x12 732 } 733 if m.Code != 0 { 734 i = encodeVarintTypes(dAtA, i, uint64(m.Code)) 735 i-- 736 dAtA[i] = 0x8 737 } 738 return len(dAtA) - i, nil 739 } 740 741 func (m *PubKeyRequest) Marshal() (dAtA []byte, err error) { 742 size := m.Size() 743 dAtA = make([]byte, size) 744 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 745 if err != nil { 746 return nil, err 747 } 748 return dAtA[:n], nil 749 } 750 751 func (m *PubKeyRequest) MarshalTo(dAtA []byte) (int, error) { 752 size := m.Size() 753 return m.MarshalToSizedBuffer(dAtA[:size]) 754 } 755 756 func (m *PubKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 757 i := len(dAtA) 758 _ = i 759 var l int 760 _ = l 761 return len(dAtA) - i, nil 762 } 763 764 func (m *PubKeyResponse) Marshal() (dAtA []byte, err error) { 765 size := m.Size() 766 dAtA = make([]byte, size) 767 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 768 if err != nil { 769 return nil, err 770 } 771 return dAtA[:n], nil 772 } 773 774 func (m *PubKeyResponse) MarshalTo(dAtA []byte) (int, error) { 775 size := m.Size() 776 return m.MarshalToSizedBuffer(dAtA[:size]) 777 } 778 779 func (m *PubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 780 i := len(dAtA) 781 _ = i 782 var l int 783 _ = l 784 if m.Error != nil { 785 { 786 size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) 787 if err != nil { 788 return 0, err 789 } 790 i -= size 791 i = encodeVarintTypes(dAtA, i, uint64(size)) 792 } 793 i-- 794 dAtA[i] = 0x12 795 } 796 if m.PubKey != nil { 797 { 798 size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i]) 799 if err != nil { 800 return 0, err 801 } 802 i -= size 803 i = encodeVarintTypes(dAtA, i, uint64(size)) 804 } 805 i-- 806 dAtA[i] = 0xa 807 } 808 return len(dAtA) - i, nil 809 } 810 811 func (m *SignVoteRequest) Marshal() (dAtA []byte, err error) { 812 size := m.Size() 813 dAtA = make([]byte, size) 814 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 815 if err != nil { 816 return nil, err 817 } 818 return dAtA[:n], nil 819 } 820 821 func (m *SignVoteRequest) MarshalTo(dAtA []byte) (int, error) { 822 size := m.Size() 823 return m.MarshalToSizedBuffer(dAtA[:size]) 824 } 825 826 func (m *SignVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 827 i := len(dAtA) 828 _ = i 829 var l int 830 _ = l 831 if m.Vote != nil { 832 { 833 size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) 834 if err != nil { 835 return 0, err 836 } 837 i -= size 838 i = encodeVarintTypes(dAtA, i, uint64(size)) 839 } 840 i-- 841 dAtA[i] = 0xa 842 } 843 return len(dAtA) - i, nil 844 } 845 846 func (m *SignedVoteResponse) Marshal() (dAtA []byte, err error) { 847 size := m.Size() 848 dAtA = make([]byte, size) 849 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 850 if err != nil { 851 return nil, err 852 } 853 return dAtA[:n], nil 854 } 855 856 func (m *SignedVoteResponse) MarshalTo(dAtA []byte) (int, error) { 857 size := m.Size() 858 return m.MarshalToSizedBuffer(dAtA[:size]) 859 } 860 861 func (m *SignedVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 862 i := len(dAtA) 863 _ = i 864 var l int 865 _ = l 866 if m.Error != nil { 867 { 868 size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) 869 if err != nil { 870 return 0, err 871 } 872 i -= size 873 i = encodeVarintTypes(dAtA, i, uint64(size)) 874 } 875 i-- 876 dAtA[i] = 0x12 877 } 878 if m.Vote != nil { 879 { 880 size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) 881 if err != nil { 882 return 0, err 883 } 884 i -= size 885 i = encodeVarintTypes(dAtA, i, uint64(size)) 886 } 887 i-- 888 dAtA[i] = 0xa 889 } 890 return len(dAtA) - i, nil 891 } 892 893 func (m *SignProposalRequest) Marshal() (dAtA []byte, err error) { 894 size := m.Size() 895 dAtA = make([]byte, size) 896 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 897 if err != nil { 898 return nil, err 899 } 900 return dAtA[:n], nil 901 } 902 903 func (m *SignProposalRequest) MarshalTo(dAtA []byte) (int, error) { 904 size := m.Size() 905 return m.MarshalToSizedBuffer(dAtA[:size]) 906 } 907 908 func (m *SignProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 909 i := len(dAtA) 910 _ = i 911 var l int 912 _ = l 913 { 914 size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) 915 if err != nil { 916 return 0, err 917 } 918 i -= size 919 i = encodeVarintTypes(dAtA, i, uint64(size)) 920 } 921 i-- 922 dAtA[i] = 0xa 923 return len(dAtA) - i, nil 924 } 925 926 func (m *SignedProposalResponse) Marshal() (dAtA []byte, err error) { 927 size := m.Size() 928 dAtA = make([]byte, size) 929 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 930 if err != nil { 931 return nil, err 932 } 933 return dAtA[:n], nil 934 } 935 936 func (m *SignedProposalResponse) MarshalTo(dAtA []byte) (int, error) { 937 size := m.Size() 938 return m.MarshalToSizedBuffer(dAtA[:size]) 939 } 940 941 func (m *SignedProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 942 i := len(dAtA) 943 _ = i 944 var l int 945 _ = l 946 if m.Error != nil { 947 { 948 size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) 949 if err != nil { 950 return 0, err 951 } 952 i -= size 953 i = encodeVarintTypes(dAtA, i, uint64(size)) 954 } 955 i-- 956 dAtA[i] = 0x12 957 } 958 if m.Proposal != nil { 959 { 960 size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) 961 if err != nil { 962 return 0, err 963 } 964 i -= size 965 i = encodeVarintTypes(dAtA, i, uint64(size)) 966 } 967 i-- 968 dAtA[i] = 0xa 969 } 970 return len(dAtA) - i, nil 971 } 972 973 func (m *PingRequest) Marshal() (dAtA []byte, err error) { 974 size := m.Size() 975 dAtA = make([]byte, size) 976 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 977 if err != nil { 978 return nil, err 979 } 980 return dAtA[:n], nil 981 } 982 983 func (m *PingRequest) MarshalTo(dAtA []byte) (int, error) { 984 size := m.Size() 985 return m.MarshalToSizedBuffer(dAtA[:size]) 986 } 987 988 func (m *PingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 989 i := len(dAtA) 990 _ = i 991 var l int 992 _ = l 993 return len(dAtA) - i, nil 994 } 995 996 func (m *PingResponse) Marshal() (dAtA []byte, err error) { 997 size := m.Size() 998 dAtA = make([]byte, size) 999 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1000 if err != nil { 1001 return nil, err 1002 } 1003 return dAtA[:n], nil 1004 } 1005 1006 func (m *PingResponse) MarshalTo(dAtA []byte) (int, error) { 1007 size := m.Size() 1008 return m.MarshalToSizedBuffer(dAtA[:size]) 1009 } 1010 1011 func (m *PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1012 i := len(dAtA) 1013 _ = i 1014 var l int 1015 _ = l 1016 return len(dAtA) - i, nil 1017 } 1018 1019 func (m *Message) Marshal() (dAtA []byte, err error) { 1020 size := m.Size() 1021 dAtA = make([]byte, size) 1022 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1023 if err != nil { 1024 return nil, err 1025 } 1026 return dAtA[:n], nil 1027 } 1028 1029 func (m *Message) MarshalTo(dAtA []byte) (int, error) { 1030 size := m.Size() 1031 return m.MarshalToSizedBuffer(dAtA[:size]) 1032 } 1033 1034 func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1035 i := len(dAtA) 1036 _ = i 1037 var l int 1038 _ = l 1039 if m.Sum != nil { 1040 { 1041 size := m.Sum.Size() 1042 i -= size 1043 if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { 1044 return 0, err 1045 } 1046 } 1047 } 1048 return len(dAtA) - i, nil 1049 } 1050 1051 func (m *Message_PubKeyRequest) MarshalTo(dAtA []byte) (int, error) { 1052 size := m.Size() 1053 return m.MarshalToSizedBuffer(dAtA[:size]) 1054 } 1055 1056 func (m *Message_PubKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1057 i := len(dAtA) 1058 if m.PubKeyRequest != nil { 1059 { 1060 size, err := m.PubKeyRequest.MarshalToSizedBuffer(dAtA[:i]) 1061 if err != nil { 1062 return 0, err 1063 } 1064 i -= size 1065 i = encodeVarintTypes(dAtA, i, uint64(size)) 1066 } 1067 i-- 1068 dAtA[i] = 0xa 1069 } 1070 return len(dAtA) - i, nil 1071 } 1072 func (m *Message_PubKeyResponse) MarshalTo(dAtA []byte) (int, error) { 1073 size := m.Size() 1074 return m.MarshalToSizedBuffer(dAtA[:size]) 1075 } 1076 1077 func (m *Message_PubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1078 i := len(dAtA) 1079 if m.PubKeyResponse != nil { 1080 { 1081 size, err := m.PubKeyResponse.MarshalToSizedBuffer(dAtA[:i]) 1082 if err != nil { 1083 return 0, err 1084 } 1085 i -= size 1086 i = encodeVarintTypes(dAtA, i, uint64(size)) 1087 } 1088 i-- 1089 dAtA[i] = 0x12 1090 } 1091 return len(dAtA) - i, nil 1092 } 1093 func (m *Message_SignVoteRequest) MarshalTo(dAtA []byte) (int, error) { 1094 size := m.Size() 1095 return m.MarshalToSizedBuffer(dAtA[:size]) 1096 } 1097 1098 func (m *Message_SignVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1099 i := len(dAtA) 1100 if m.SignVoteRequest != nil { 1101 { 1102 size, err := m.SignVoteRequest.MarshalToSizedBuffer(dAtA[:i]) 1103 if err != nil { 1104 return 0, err 1105 } 1106 i -= size 1107 i = encodeVarintTypes(dAtA, i, uint64(size)) 1108 } 1109 i-- 1110 dAtA[i] = 0x1a 1111 } 1112 return len(dAtA) - i, nil 1113 } 1114 func (m *Message_SignedVoteResponse) MarshalTo(dAtA []byte) (int, error) { 1115 size := m.Size() 1116 return m.MarshalToSizedBuffer(dAtA[:size]) 1117 } 1118 1119 func (m *Message_SignedVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1120 i := len(dAtA) 1121 if m.SignedVoteResponse != nil { 1122 { 1123 size, err := m.SignedVoteResponse.MarshalToSizedBuffer(dAtA[:i]) 1124 if err != nil { 1125 return 0, err 1126 } 1127 i -= size 1128 i = encodeVarintTypes(dAtA, i, uint64(size)) 1129 } 1130 i-- 1131 dAtA[i] = 0x22 1132 } 1133 return len(dAtA) - i, nil 1134 } 1135 func (m *Message_SignProposalRequest) MarshalTo(dAtA []byte) (int, error) { 1136 size := m.Size() 1137 return m.MarshalToSizedBuffer(dAtA[:size]) 1138 } 1139 1140 func (m *Message_SignProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1141 i := len(dAtA) 1142 if m.SignProposalRequest != nil { 1143 { 1144 size, err := m.SignProposalRequest.MarshalToSizedBuffer(dAtA[:i]) 1145 if err != nil { 1146 return 0, err 1147 } 1148 i -= size 1149 i = encodeVarintTypes(dAtA, i, uint64(size)) 1150 } 1151 i-- 1152 dAtA[i] = 0x2a 1153 } 1154 return len(dAtA) - i, nil 1155 } 1156 func (m *Message_SignedProposalResponse) MarshalTo(dAtA []byte) (int, error) { 1157 size := m.Size() 1158 return m.MarshalToSizedBuffer(dAtA[:size]) 1159 } 1160 1161 func (m *Message_SignedProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1162 i := len(dAtA) 1163 if m.SignedProposalResponse != nil { 1164 { 1165 size, err := m.SignedProposalResponse.MarshalToSizedBuffer(dAtA[:i]) 1166 if err != nil { 1167 return 0, err 1168 } 1169 i -= size 1170 i = encodeVarintTypes(dAtA, i, uint64(size)) 1171 } 1172 i-- 1173 dAtA[i] = 0x32 1174 } 1175 return len(dAtA) - i, nil 1176 } 1177 func (m *Message_PingRequest) MarshalTo(dAtA []byte) (int, error) { 1178 size := m.Size() 1179 return m.MarshalToSizedBuffer(dAtA[:size]) 1180 } 1181 1182 func (m *Message_PingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1183 i := len(dAtA) 1184 if m.PingRequest != nil { 1185 { 1186 size, err := m.PingRequest.MarshalToSizedBuffer(dAtA[:i]) 1187 if err != nil { 1188 return 0, err 1189 } 1190 i -= size 1191 i = encodeVarintTypes(dAtA, i, uint64(size)) 1192 } 1193 i-- 1194 dAtA[i] = 0x3a 1195 } 1196 return len(dAtA) - i, nil 1197 } 1198 func (m *Message_PingResponse) MarshalTo(dAtA []byte) (int, error) { 1199 size := m.Size() 1200 return m.MarshalToSizedBuffer(dAtA[:size]) 1201 } 1202 1203 func (m *Message_PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1204 i := len(dAtA) 1205 if m.PingResponse != nil { 1206 { 1207 size, err := m.PingResponse.MarshalToSizedBuffer(dAtA[:i]) 1208 if err != nil { 1209 return 0, err 1210 } 1211 i -= size 1212 i = encodeVarintTypes(dAtA, i, uint64(size)) 1213 } 1214 i-- 1215 dAtA[i] = 0x42 1216 } 1217 return len(dAtA) - i, nil 1218 } 1219 func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { 1220 offset -= sovTypes(v) 1221 base := offset 1222 for v >= 1<<7 { 1223 dAtA[offset] = uint8(v&0x7f | 0x80) 1224 v >>= 7 1225 offset++ 1226 } 1227 dAtA[offset] = uint8(v) 1228 return base 1229 } 1230 func (m *RemoteSignerError) Size() (n int) { 1231 if m == nil { 1232 return 0 1233 } 1234 var l int 1235 _ = l 1236 if m.Code != 0 { 1237 n += 1 + sovTypes(uint64(m.Code)) 1238 } 1239 l = len(m.Description) 1240 if l > 0 { 1241 n += 1 + l + sovTypes(uint64(l)) 1242 } 1243 return n 1244 } 1245 1246 func (m *PubKeyRequest) Size() (n int) { 1247 if m == nil { 1248 return 0 1249 } 1250 var l int 1251 _ = l 1252 return n 1253 } 1254 1255 func (m *PubKeyResponse) Size() (n int) { 1256 if m == nil { 1257 return 0 1258 } 1259 var l int 1260 _ = l 1261 if m.PubKey != nil { 1262 l = m.PubKey.Size() 1263 n += 1 + l + sovTypes(uint64(l)) 1264 } 1265 if m.Error != nil { 1266 l = m.Error.Size() 1267 n += 1 + l + sovTypes(uint64(l)) 1268 } 1269 return n 1270 } 1271 1272 func (m *SignVoteRequest) Size() (n int) { 1273 if m == nil { 1274 return 0 1275 } 1276 var l int 1277 _ = l 1278 if m.Vote != nil { 1279 l = m.Vote.Size() 1280 n += 1 + l + sovTypes(uint64(l)) 1281 } 1282 return n 1283 } 1284 1285 func (m *SignedVoteResponse) Size() (n int) { 1286 if m == nil { 1287 return 0 1288 } 1289 var l int 1290 _ = l 1291 if m.Vote != nil { 1292 l = m.Vote.Size() 1293 n += 1 + l + sovTypes(uint64(l)) 1294 } 1295 if m.Error != nil { 1296 l = m.Error.Size() 1297 n += 1 + l + sovTypes(uint64(l)) 1298 } 1299 return n 1300 } 1301 1302 func (m *SignProposalRequest) Size() (n int) { 1303 if m == nil { 1304 return 0 1305 } 1306 var l int 1307 _ = l 1308 l = m.Proposal.Size() 1309 n += 1 + l + sovTypes(uint64(l)) 1310 return n 1311 } 1312 1313 func (m *SignedProposalResponse) Size() (n int) { 1314 if m == nil { 1315 return 0 1316 } 1317 var l int 1318 _ = l 1319 if m.Proposal != nil { 1320 l = m.Proposal.Size() 1321 n += 1 + l + sovTypes(uint64(l)) 1322 } 1323 if m.Error != nil { 1324 l = m.Error.Size() 1325 n += 1 + l + sovTypes(uint64(l)) 1326 } 1327 return n 1328 } 1329 1330 func (m *PingRequest) Size() (n int) { 1331 if m == nil { 1332 return 0 1333 } 1334 var l int 1335 _ = l 1336 return n 1337 } 1338 1339 func (m *PingResponse) Size() (n int) { 1340 if m == nil { 1341 return 0 1342 } 1343 var l int 1344 _ = l 1345 return n 1346 } 1347 1348 func (m *Message) Size() (n int) { 1349 if m == nil { 1350 return 0 1351 } 1352 var l int 1353 _ = l 1354 if m.Sum != nil { 1355 n += m.Sum.Size() 1356 } 1357 return n 1358 } 1359 1360 func (m *Message_PubKeyRequest) Size() (n int) { 1361 if m == nil { 1362 return 0 1363 } 1364 var l int 1365 _ = l 1366 if m.PubKeyRequest != nil { 1367 l = m.PubKeyRequest.Size() 1368 n += 1 + l + sovTypes(uint64(l)) 1369 } 1370 return n 1371 } 1372 func (m *Message_PubKeyResponse) Size() (n int) { 1373 if m == nil { 1374 return 0 1375 } 1376 var l int 1377 _ = l 1378 if m.PubKeyResponse != nil { 1379 l = m.PubKeyResponse.Size() 1380 n += 1 + l + sovTypes(uint64(l)) 1381 } 1382 return n 1383 } 1384 func (m *Message_SignVoteRequest) Size() (n int) { 1385 if m == nil { 1386 return 0 1387 } 1388 var l int 1389 _ = l 1390 if m.SignVoteRequest != nil { 1391 l = m.SignVoteRequest.Size() 1392 n += 1 + l + sovTypes(uint64(l)) 1393 } 1394 return n 1395 } 1396 func (m *Message_SignedVoteResponse) Size() (n int) { 1397 if m == nil { 1398 return 0 1399 } 1400 var l int 1401 _ = l 1402 if m.SignedVoteResponse != nil { 1403 l = m.SignedVoteResponse.Size() 1404 n += 1 + l + sovTypes(uint64(l)) 1405 } 1406 return n 1407 } 1408 func (m *Message_SignProposalRequest) Size() (n int) { 1409 if m == nil { 1410 return 0 1411 } 1412 var l int 1413 _ = l 1414 if m.SignProposalRequest != nil { 1415 l = m.SignProposalRequest.Size() 1416 n += 1 + l + sovTypes(uint64(l)) 1417 } 1418 return n 1419 } 1420 func (m *Message_SignedProposalResponse) Size() (n int) { 1421 if m == nil { 1422 return 0 1423 } 1424 var l int 1425 _ = l 1426 if m.SignedProposalResponse != nil { 1427 l = m.SignedProposalResponse.Size() 1428 n += 1 + l + sovTypes(uint64(l)) 1429 } 1430 return n 1431 } 1432 func (m *Message_PingRequest) Size() (n int) { 1433 if m == nil { 1434 return 0 1435 } 1436 var l int 1437 _ = l 1438 if m.PingRequest != nil { 1439 l = m.PingRequest.Size() 1440 n += 1 + l + sovTypes(uint64(l)) 1441 } 1442 return n 1443 } 1444 func (m *Message_PingResponse) Size() (n int) { 1445 if m == nil { 1446 return 0 1447 } 1448 var l int 1449 _ = l 1450 if m.PingResponse != nil { 1451 l = m.PingResponse.Size() 1452 n += 1 + l + sovTypes(uint64(l)) 1453 } 1454 return n 1455 } 1456 1457 func sovTypes(x uint64) (n int) { 1458 return (math_bits.Len64(x|1) + 6) / 7 1459 } 1460 func sozTypes(x uint64) (n int) { 1461 return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1462 } 1463 func (m *RemoteSignerError) Unmarshal(dAtA []byte) error { 1464 l := len(dAtA) 1465 iNdEx := 0 1466 for iNdEx < l { 1467 preIndex := iNdEx 1468 var wire uint64 1469 for shift := uint(0); ; shift += 7 { 1470 if shift >= 64 { 1471 return ErrIntOverflowTypes 1472 } 1473 if iNdEx >= l { 1474 return io.ErrUnexpectedEOF 1475 } 1476 b := dAtA[iNdEx] 1477 iNdEx++ 1478 wire |= uint64(b&0x7F) << shift 1479 if b < 0x80 { 1480 break 1481 } 1482 } 1483 fieldNum := int32(wire >> 3) 1484 wireType := int(wire & 0x7) 1485 if wireType == 4 { 1486 return fmt.Errorf("proto: RemoteSignerError: wiretype end group for non-group") 1487 } 1488 if fieldNum <= 0 { 1489 return fmt.Errorf("proto: RemoteSignerError: illegal tag %d (wire type %d)", fieldNum, wire) 1490 } 1491 switch fieldNum { 1492 case 1: 1493 if wireType != 0 { 1494 return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) 1495 } 1496 m.Code = 0 1497 for shift := uint(0); ; shift += 7 { 1498 if shift >= 64 { 1499 return ErrIntOverflowTypes 1500 } 1501 if iNdEx >= l { 1502 return io.ErrUnexpectedEOF 1503 } 1504 b := dAtA[iNdEx] 1505 iNdEx++ 1506 m.Code |= int32(b&0x7F) << shift 1507 if b < 0x80 { 1508 break 1509 } 1510 } 1511 case 2: 1512 if wireType != 2 { 1513 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 1514 } 1515 var stringLen uint64 1516 for shift := uint(0); ; shift += 7 { 1517 if shift >= 64 { 1518 return ErrIntOverflowTypes 1519 } 1520 if iNdEx >= l { 1521 return io.ErrUnexpectedEOF 1522 } 1523 b := dAtA[iNdEx] 1524 iNdEx++ 1525 stringLen |= uint64(b&0x7F) << shift 1526 if b < 0x80 { 1527 break 1528 } 1529 } 1530 intStringLen := int(stringLen) 1531 if intStringLen < 0 { 1532 return ErrInvalidLengthTypes 1533 } 1534 postIndex := iNdEx + intStringLen 1535 if postIndex < 0 { 1536 return ErrInvalidLengthTypes 1537 } 1538 if postIndex > l { 1539 return io.ErrUnexpectedEOF 1540 } 1541 m.Description = string(dAtA[iNdEx:postIndex]) 1542 iNdEx = postIndex 1543 default: 1544 iNdEx = preIndex 1545 skippy, err := skipTypes(dAtA[iNdEx:]) 1546 if err != nil { 1547 return err 1548 } 1549 if skippy < 0 { 1550 return ErrInvalidLengthTypes 1551 } 1552 if (iNdEx + skippy) < 0 { 1553 return ErrInvalidLengthTypes 1554 } 1555 if (iNdEx + skippy) > l { 1556 return io.ErrUnexpectedEOF 1557 } 1558 iNdEx += skippy 1559 } 1560 } 1561 1562 if iNdEx > l { 1563 return io.ErrUnexpectedEOF 1564 } 1565 return nil 1566 } 1567 func (m *PubKeyRequest) Unmarshal(dAtA []byte) error { 1568 l := len(dAtA) 1569 iNdEx := 0 1570 for iNdEx < l { 1571 preIndex := iNdEx 1572 var wire uint64 1573 for shift := uint(0); ; shift += 7 { 1574 if shift >= 64 { 1575 return ErrIntOverflowTypes 1576 } 1577 if iNdEx >= l { 1578 return io.ErrUnexpectedEOF 1579 } 1580 b := dAtA[iNdEx] 1581 iNdEx++ 1582 wire |= uint64(b&0x7F) << shift 1583 if b < 0x80 { 1584 break 1585 } 1586 } 1587 fieldNum := int32(wire >> 3) 1588 wireType := int(wire & 0x7) 1589 if wireType == 4 { 1590 return fmt.Errorf("proto: PubKeyRequest: wiretype end group for non-group") 1591 } 1592 if fieldNum <= 0 { 1593 return fmt.Errorf("proto: PubKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1594 } 1595 switch fieldNum { 1596 default: 1597 iNdEx = preIndex 1598 skippy, err := skipTypes(dAtA[iNdEx:]) 1599 if err != nil { 1600 return err 1601 } 1602 if skippy < 0 { 1603 return ErrInvalidLengthTypes 1604 } 1605 if (iNdEx + skippy) < 0 { 1606 return ErrInvalidLengthTypes 1607 } 1608 if (iNdEx + skippy) > l { 1609 return io.ErrUnexpectedEOF 1610 } 1611 iNdEx += skippy 1612 } 1613 } 1614 1615 if iNdEx > l { 1616 return io.ErrUnexpectedEOF 1617 } 1618 return nil 1619 } 1620 func (m *PubKeyResponse) Unmarshal(dAtA []byte) error { 1621 l := len(dAtA) 1622 iNdEx := 0 1623 for iNdEx < l { 1624 preIndex := iNdEx 1625 var wire uint64 1626 for shift := uint(0); ; shift += 7 { 1627 if shift >= 64 { 1628 return ErrIntOverflowTypes 1629 } 1630 if iNdEx >= l { 1631 return io.ErrUnexpectedEOF 1632 } 1633 b := dAtA[iNdEx] 1634 iNdEx++ 1635 wire |= uint64(b&0x7F) << shift 1636 if b < 0x80 { 1637 break 1638 } 1639 } 1640 fieldNum := int32(wire >> 3) 1641 wireType := int(wire & 0x7) 1642 if wireType == 4 { 1643 return fmt.Errorf("proto: PubKeyResponse: wiretype end group for non-group") 1644 } 1645 if fieldNum <= 0 { 1646 return fmt.Errorf("proto: PubKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1647 } 1648 switch fieldNum { 1649 case 1: 1650 if wireType != 2 { 1651 return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) 1652 } 1653 var msglen int 1654 for shift := uint(0); ; shift += 7 { 1655 if shift >= 64 { 1656 return ErrIntOverflowTypes 1657 } 1658 if iNdEx >= l { 1659 return io.ErrUnexpectedEOF 1660 } 1661 b := dAtA[iNdEx] 1662 iNdEx++ 1663 msglen |= int(b&0x7F) << shift 1664 if b < 0x80 { 1665 break 1666 } 1667 } 1668 if msglen < 0 { 1669 return ErrInvalidLengthTypes 1670 } 1671 postIndex := iNdEx + msglen 1672 if postIndex < 0 { 1673 return ErrInvalidLengthTypes 1674 } 1675 if postIndex > l { 1676 return io.ErrUnexpectedEOF 1677 } 1678 if m.PubKey == nil { 1679 m.PubKey = &crypto.PublicKey{} 1680 } 1681 if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1682 return err 1683 } 1684 iNdEx = postIndex 1685 case 2: 1686 if wireType != 2 { 1687 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 1688 } 1689 var msglen int 1690 for shift := uint(0); ; shift += 7 { 1691 if shift >= 64 { 1692 return ErrIntOverflowTypes 1693 } 1694 if iNdEx >= l { 1695 return io.ErrUnexpectedEOF 1696 } 1697 b := dAtA[iNdEx] 1698 iNdEx++ 1699 msglen |= int(b&0x7F) << shift 1700 if b < 0x80 { 1701 break 1702 } 1703 } 1704 if msglen < 0 { 1705 return ErrInvalidLengthTypes 1706 } 1707 postIndex := iNdEx + msglen 1708 if postIndex < 0 { 1709 return ErrInvalidLengthTypes 1710 } 1711 if postIndex > l { 1712 return io.ErrUnexpectedEOF 1713 } 1714 if m.Error == nil { 1715 m.Error = &RemoteSignerError{} 1716 } 1717 if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1718 return err 1719 } 1720 iNdEx = postIndex 1721 default: 1722 iNdEx = preIndex 1723 skippy, err := skipTypes(dAtA[iNdEx:]) 1724 if err != nil { 1725 return err 1726 } 1727 if skippy < 0 { 1728 return ErrInvalidLengthTypes 1729 } 1730 if (iNdEx + skippy) < 0 { 1731 return ErrInvalidLengthTypes 1732 } 1733 if (iNdEx + skippy) > l { 1734 return io.ErrUnexpectedEOF 1735 } 1736 iNdEx += skippy 1737 } 1738 } 1739 1740 if iNdEx > l { 1741 return io.ErrUnexpectedEOF 1742 } 1743 return nil 1744 } 1745 func (m *SignVoteRequest) Unmarshal(dAtA []byte) error { 1746 l := len(dAtA) 1747 iNdEx := 0 1748 for iNdEx < l { 1749 preIndex := iNdEx 1750 var wire uint64 1751 for shift := uint(0); ; shift += 7 { 1752 if shift >= 64 { 1753 return ErrIntOverflowTypes 1754 } 1755 if iNdEx >= l { 1756 return io.ErrUnexpectedEOF 1757 } 1758 b := dAtA[iNdEx] 1759 iNdEx++ 1760 wire |= uint64(b&0x7F) << shift 1761 if b < 0x80 { 1762 break 1763 } 1764 } 1765 fieldNum := int32(wire >> 3) 1766 wireType := int(wire & 0x7) 1767 if wireType == 4 { 1768 return fmt.Errorf("proto: SignVoteRequest: wiretype end group for non-group") 1769 } 1770 if fieldNum <= 0 { 1771 return fmt.Errorf("proto: SignVoteRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1772 } 1773 switch fieldNum { 1774 case 1: 1775 if wireType != 2 { 1776 return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) 1777 } 1778 var msglen int 1779 for shift := uint(0); ; shift += 7 { 1780 if shift >= 64 { 1781 return ErrIntOverflowTypes 1782 } 1783 if iNdEx >= l { 1784 return io.ErrUnexpectedEOF 1785 } 1786 b := dAtA[iNdEx] 1787 iNdEx++ 1788 msglen |= int(b&0x7F) << shift 1789 if b < 0x80 { 1790 break 1791 } 1792 } 1793 if msglen < 0 { 1794 return ErrInvalidLengthTypes 1795 } 1796 postIndex := iNdEx + msglen 1797 if postIndex < 0 { 1798 return ErrInvalidLengthTypes 1799 } 1800 if postIndex > l { 1801 return io.ErrUnexpectedEOF 1802 } 1803 if m.Vote == nil { 1804 m.Vote = &types.Vote{} 1805 } 1806 if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1807 return err 1808 } 1809 iNdEx = postIndex 1810 default: 1811 iNdEx = preIndex 1812 skippy, err := skipTypes(dAtA[iNdEx:]) 1813 if err != nil { 1814 return err 1815 } 1816 if skippy < 0 { 1817 return ErrInvalidLengthTypes 1818 } 1819 if (iNdEx + skippy) < 0 { 1820 return ErrInvalidLengthTypes 1821 } 1822 if (iNdEx + skippy) > l { 1823 return io.ErrUnexpectedEOF 1824 } 1825 iNdEx += skippy 1826 } 1827 } 1828 1829 if iNdEx > l { 1830 return io.ErrUnexpectedEOF 1831 } 1832 return nil 1833 } 1834 func (m *SignedVoteResponse) Unmarshal(dAtA []byte) error { 1835 l := len(dAtA) 1836 iNdEx := 0 1837 for iNdEx < l { 1838 preIndex := iNdEx 1839 var wire uint64 1840 for shift := uint(0); ; shift += 7 { 1841 if shift >= 64 { 1842 return ErrIntOverflowTypes 1843 } 1844 if iNdEx >= l { 1845 return io.ErrUnexpectedEOF 1846 } 1847 b := dAtA[iNdEx] 1848 iNdEx++ 1849 wire |= uint64(b&0x7F) << shift 1850 if b < 0x80 { 1851 break 1852 } 1853 } 1854 fieldNum := int32(wire >> 3) 1855 wireType := int(wire & 0x7) 1856 if wireType == 4 { 1857 return fmt.Errorf("proto: SignedVoteResponse: wiretype end group for non-group") 1858 } 1859 if fieldNum <= 0 { 1860 return fmt.Errorf("proto: SignedVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1861 } 1862 switch fieldNum { 1863 case 1: 1864 if wireType != 2 { 1865 return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) 1866 } 1867 var msglen int 1868 for shift := uint(0); ; shift += 7 { 1869 if shift >= 64 { 1870 return ErrIntOverflowTypes 1871 } 1872 if iNdEx >= l { 1873 return io.ErrUnexpectedEOF 1874 } 1875 b := dAtA[iNdEx] 1876 iNdEx++ 1877 msglen |= int(b&0x7F) << shift 1878 if b < 0x80 { 1879 break 1880 } 1881 } 1882 if msglen < 0 { 1883 return ErrInvalidLengthTypes 1884 } 1885 postIndex := iNdEx + msglen 1886 if postIndex < 0 { 1887 return ErrInvalidLengthTypes 1888 } 1889 if postIndex > l { 1890 return io.ErrUnexpectedEOF 1891 } 1892 if m.Vote == nil { 1893 m.Vote = &types.Vote{} 1894 } 1895 if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1896 return err 1897 } 1898 iNdEx = postIndex 1899 case 2: 1900 if wireType != 2 { 1901 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 1902 } 1903 var msglen int 1904 for shift := uint(0); ; shift += 7 { 1905 if shift >= 64 { 1906 return ErrIntOverflowTypes 1907 } 1908 if iNdEx >= l { 1909 return io.ErrUnexpectedEOF 1910 } 1911 b := dAtA[iNdEx] 1912 iNdEx++ 1913 msglen |= int(b&0x7F) << shift 1914 if b < 0x80 { 1915 break 1916 } 1917 } 1918 if msglen < 0 { 1919 return ErrInvalidLengthTypes 1920 } 1921 postIndex := iNdEx + msglen 1922 if postIndex < 0 { 1923 return ErrInvalidLengthTypes 1924 } 1925 if postIndex > l { 1926 return io.ErrUnexpectedEOF 1927 } 1928 if m.Error == nil { 1929 m.Error = &RemoteSignerError{} 1930 } 1931 if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1932 return err 1933 } 1934 iNdEx = postIndex 1935 default: 1936 iNdEx = preIndex 1937 skippy, err := skipTypes(dAtA[iNdEx:]) 1938 if err != nil { 1939 return err 1940 } 1941 if skippy < 0 { 1942 return ErrInvalidLengthTypes 1943 } 1944 if (iNdEx + skippy) < 0 { 1945 return ErrInvalidLengthTypes 1946 } 1947 if (iNdEx + skippy) > l { 1948 return io.ErrUnexpectedEOF 1949 } 1950 iNdEx += skippy 1951 } 1952 } 1953 1954 if iNdEx > l { 1955 return io.ErrUnexpectedEOF 1956 } 1957 return nil 1958 } 1959 func (m *SignProposalRequest) Unmarshal(dAtA []byte) error { 1960 l := len(dAtA) 1961 iNdEx := 0 1962 for iNdEx < l { 1963 preIndex := iNdEx 1964 var wire uint64 1965 for shift := uint(0); ; shift += 7 { 1966 if shift >= 64 { 1967 return ErrIntOverflowTypes 1968 } 1969 if iNdEx >= l { 1970 return io.ErrUnexpectedEOF 1971 } 1972 b := dAtA[iNdEx] 1973 iNdEx++ 1974 wire |= uint64(b&0x7F) << shift 1975 if b < 0x80 { 1976 break 1977 } 1978 } 1979 fieldNum := int32(wire >> 3) 1980 wireType := int(wire & 0x7) 1981 if wireType == 4 { 1982 return fmt.Errorf("proto: SignProposalRequest: wiretype end group for non-group") 1983 } 1984 if fieldNum <= 0 { 1985 return fmt.Errorf("proto: SignProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1986 } 1987 switch fieldNum { 1988 case 1: 1989 if wireType != 2 { 1990 return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) 1991 } 1992 var msglen int 1993 for shift := uint(0); ; shift += 7 { 1994 if shift >= 64 { 1995 return ErrIntOverflowTypes 1996 } 1997 if iNdEx >= l { 1998 return io.ErrUnexpectedEOF 1999 } 2000 b := dAtA[iNdEx] 2001 iNdEx++ 2002 msglen |= int(b&0x7F) << shift 2003 if b < 0x80 { 2004 break 2005 } 2006 } 2007 if msglen < 0 { 2008 return ErrInvalidLengthTypes 2009 } 2010 postIndex := iNdEx + msglen 2011 if postIndex < 0 { 2012 return ErrInvalidLengthTypes 2013 } 2014 if postIndex > l { 2015 return io.ErrUnexpectedEOF 2016 } 2017 if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2018 return err 2019 } 2020 iNdEx = postIndex 2021 default: 2022 iNdEx = preIndex 2023 skippy, err := skipTypes(dAtA[iNdEx:]) 2024 if err != nil { 2025 return err 2026 } 2027 if skippy < 0 { 2028 return ErrInvalidLengthTypes 2029 } 2030 if (iNdEx + skippy) < 0 { 2031 return ErrInvalidLengthTypes 2032 } 2033 if (iNdEx + skippy) > l { 2034 return io.ErrUnexpectedEOF 2035 } 2036 iNdEx += skippy 2037 } 2038 } 2039 2040 if iNdEx > l { 2041 return io.ErrUnexpectedEOF 2042 } 2043 return nil 2044 } 2045 func (m *SignedProposalResponse) Unmarshal(dAtA []byte) error { 2046 l := len(dAtA) 2047 iNdEx := 0 2048 for iNdEx < l { 2049 preIndex := iNdEx 2050 var wire uint64 2051 for shift := uint(0); ; shift += 7 { 2052 if shift >= 64 { 2053 return ErrIntOverflowTypes 2054 } 2055 if iNdEx >= l { 2056 return io.ErrUnexpectedEOF 2057 } 2058 b := dAtA[iNdEx] 2059 iNdEx++ 2060 wire |= uint64(b&0x7F) << shift 2061 if b < 0x80 { 2062 break 2063 } 2064 } 2065 fieldNum := int32(wire >> 3) 2066 wireType := int(wire & 0x7) 2067 if wireType == 4 { 2068 return fmt.Errorf("proto: SignedProposalResponse: wiretype end group for non-group") 2069 } 2070 if fieldNum <= 0 { 2071 return fmt.Errorf("proto: SignedProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2072 } 2073 switch fieldNum { 2074 case 1: 2075 if wireType != 2 { 2076 return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) 2077 } 2078 var msglen int 2079 for shift := uint(0); ; shift += 7 { 2080 if shift >= 64 { 2081 return ErrIntOverflowTypes 2082 } 2083 if iNdEx >= l { 2084 return io.ErrUnexpectedEOF 2085 } 2086 b := dAtA[iNdEx] 2087 iNdEx++ 2088 msglen |= int(b&0x7F) << shift 2089 if b < 0x80 { 2090 break 2091 } 2092 } 2093 if msglen < 0 { 2094 return ErrInvalidLengthTypes 2095 } 2096 postIndex := iNdEx + msglen 2097 if postIndex < 0 { 2098 return ErrInvalidLengthTypes 2099 } 2100 if postIndex > l { 2101 return io.ErrUnexpectedEOF 2102 } 2103 if m.Proposal == nil { 2104 m.Proposal = &types.Proposal{} 2105 } 2106 if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2107 return err 2108 } 2109 iNdEx = postIndex 2110 case 2: 2111 if wireType != 2 { 2112 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 2113 } 2114 var msglen int 2115 for shift := uint(0); ; shift += 7 { 2116 if shift >= 64 { 2117 return ErrIntOverflowTypes 2118 } 2119 if iNdEx >= l { 2120 return io.ErrUnexpectedEOF 2121 } 2122 b := dAtA[iNdEx] 2123 iNdEx++ 2124 msglen |= int(b&0x7F) << shift 2125 if b < 0x80 { 2126 break 2127 } 2128 } 2129 if msglen < 0 { 2130 return ErrInvalidLengthTypes 2131 } 2132 postIndex := iNdEx + msglen 2133 if postIndex < 0 { 2134 return ErrInvalidLengthTypes 2135 } 2136 if postIndex > l { 2137 return io.ErrUnexpectedEOF 2138 } 2139 if m.Error == nil { 2140 m.Error = &RemoteSignerError{} 2141 } 2142 if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2143 return err 2144 } 2145 iNdEx = postIndex 2146 default: 2147 iNdEx = preIndex 2148 skippy, err := skipTypes(dAtA[iNdEx:]) 2149 if err != nil { 2150 return err 2151 } 2152 if skippy < 0 { 2153 return ErrInvalidLengthTypes 2154 } 2155 if (iNdEx + skippy) < 0 { 2156 return ErrInvalidLengthTypes 2157 } 2158 if (iNdEx + skippy) > l { 2159 return io.ErrUnexpectedEOF 2160 } 2161 iNdEx += skippy 2162 } 2163 } 2164 2165 if iNdEx > l { 2166 return io.ErrUnexpectedEOF 2167 } 2168 return nil 2169 } 2170 func (m *PingRequest) Unmarshal(dAtA []byte) error { 2171 l := len(dAtA) 2172 iNdEx := 0 2173 for iNdEx < l { 2174 preIndex := iNdEx 2175 var wire uint64 2176 for shift := uint(0); ; shift += 7 { 2177 if shift >= 64 { 2178 return ErrIntOverflowTypes 2179 } 2180 if iNdEx >= l { 2181 return io.ErrUnexpectedEOF 2182 } 2183 b := dAtA[iNdEx] 2184 iNdEx++ 2185 wire |= uint64(b&0x7F) << shift 2186 if b < 0x80 { 2187 break 2188 } 2189 } 2190 fieldNum := int32(wire >> 3) 2191 wireType := int(wire & 0x7) 2192 if wireType == 4 { 2193 return fmt.Errorf("proto: PingRequest: wiretype end group for non-group") 2194 } 2195 if fieldNum <= 0 { 2196 return fmt.Errorf("proto: PingRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2197 } 2198 switch fieldNum { 2199 default: 2200 iNdEx = preIndex 2201 skippy, err := skipTypes(dAtA[iNdEx:]) 2202 if err != nil { 2203 return err 2204 } 2205 if skippy < 0 { 2206 return ErrInvalidLengthTypes 2207 } 2208 if (iNdEx + skippy) < 0 { 2209 return ErrInvalidLengthTypes 2210 } 2211 if (iNdEx + skippy) > l { 2212 return io.ErrUnexpectedEOF 2213 } 2214 iNdEx += skippy 2215 } 2216 } 2217 2218 if iNdEx > l { 2219 return io.ErrUnexpectedEOF 2220 } 2221 return nil 2222 } 2223 func (m *PingResponse) Unmarshal(dAtA []byte) error { 2224 l := len(dAtA) 2225 iNdEx := 0 2226 for iNdEx < l { 2227 preIndex := iNdEx 2228 var wire uint64 2229 for shift := uint(0); ; shift += 7 { 2230 if shift >= 64 { 2231 return ErrIntOverflowTypes 2232 } 2233 if iNdEx >= l { 2234 return io.ErrUnexpectedEOF 2235 } 2236 b := dAtA[iNdEx] 2237 iNdEx++ 2238 wire |= uint64(b&0x7F) << shift 2239 if b < 0x80 { 2240 break 2241 } 2242 } 2243 fieldNum := int32(wire >> 3) 2244 wireType := int(wire & 0x7) 2245 if wireType == 4 { 2246 return fmt.Errorf("proto: PingResponse: wiretype end group for non-group") 2247 } 2248 if fieldNum <= 0 { 2249 return fmt.Errorf("proto: PingResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2250 } 2251 switch fieldNum { 2252 default: 2253 iNdEx = preIndex 2254 skippy, err := skipTypes(dAtA[iNdEx:]) 2255 if err != nil { 2256 return err 2257 } 2258 if skippy < 0 { 2259 return ErrInvalidLengthTypes 2260 } 2261 if (iNdEx + skippy) < 0 { 2262 return ErrInvalidLengthTypes 2263 } 2264 if (iNdEx + skippy) > l { 2265 return io.ErrUnexpectedEOF 2266 } 2267 iNdEx += skippy 2268 } 2269 } 2270 2271 if iNdEx > l { 2272 return io.ErrUnexpectedEOF 2273 } 2274 return nil 2275 } 2276 func (m *Message) Unmarshal(dAtA []byte) error { 2277 l := len(dAtA) 2278 iNdEx := 0 2279 for iNdEx < l { 2280 preIndex := iNdEx 2281 var wire uint64 2282 for shift := uint(0); ; shift += 7 { 2283 if shift >= 64 { 2284 return ErrIntOverflowTypes 2285 } 2286 if iNdEx >= l { 2287 return io.ErrUnexpectedEOF 2288 } 2289 b := dAtA[iNdEx] 2290 iNdEx++ 2291 wire |= uint64(b&0x7F) << shift 2292 if b < 0x80 { 2293 break 2294 } 2295 } 2296 fieldNum := int32(wire >> 3) 2297 wireType := int(wire & 0x7) 2298 if wireType == 4 { 2299 return fmt.Errorf("proto: Message: wiretype end group for non-group") 2300 } 2301 if fieldNum <= 0 { 2302 return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) 2303 } 2304 switch fieldNum { 2305 case 1: 2306 if wireType != 2 { 2307 return fmt.Errorf("proto: wrong wireType = %d for field PubKeyRequest", wireType) 2308 } 2309 var msglen int 2310 for shift := uint(0); ; shift += 7 { 2311 if shift >= 64 { 2312 return ErrIntOverflowTypes 2313 } 2314 if iNdEx >= l { 2315 return io.ErrUnexpectedEOF 2316 } 2317 b := dAtA[iNdEx] 2318 iNdEx++ 2319 msglen |= int(b&0x7F) << shift 2320 if b < 0x80 { 2321 break 2322 } 2323 } 2324 if msglen < 0 { 2325 return ErrInvalidLengthTypes 2326 } 2327 postIndex := iNdEx + msglen 2328 if postIndex < 0 { 2329 return ErrInvalidLengthTypes 2330 } 2331 if postIndex > l { 2332 return io.ErrUnexpectedEOF 2333 } 2334 v := &PubKeyRequest{} 2335 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2336 return err 2337 } 2338 m.Sum = &Message_PubKeyRequest{v} 2339 iNdEx = postIndex 2340 case 2: 2341 if wireType != 2 { 2342 return fmt.Errorf("proto: wrong wireType = %d for field PubKeyResponse", wireType) 2343 } 2344 var msglen int 2345 for shift := uint(0); ; shift += 7 { 2346 if shift >= 64 { 2347 return ErrIntOverflowTypes 2348 } 2349 if iNdEx >= l { 2350 return io.ErrUnexpectedEOF 2351 } 2352 b := dAtA[iNdEx] 2353 iNdEx++ 2354 msglen |= int(b&0x7F) << shift 2355 if b < 0x80 { 2356 break 2357 } 2358 } 2359 if msglen < 0 { 2360 return ErrInvalidLengthTypes 2361 } 2362 postIndex := iNdEx + msglen 2363 if postIndex < 0 { 2364 return ErrInvalidLengthTypes 2365 } 2366 if postIndex > l { 2367 return io.ErrUnexpectedEOF 2368 } 2369 v := &PubKeyResponse{} 2370 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2371 return err 2372 } 2373 m.Sum = &Message_PubKeyResponse{v} 2374 iNdEx = postIndex 2375 case 3: 2376 if wireType != 2 { 2377 return fmt.Errorf("proto: wrong wireType = %d for field SignVoteRequest", wireType) 2378 } 2379 var msglen int 2380 for shift := uint(0); ; shift += 7 { 2381 if shift >= 64 { 2382 return ErrIntOverflowTypes 2383 } 2384 if iNdEx >= l { 2385 return io.ErrUnexpectedEOF 2386 } 2387 b := dAtA[iNdEx] 2388 iNdEx++ 2389 msglen |= int(b&0x7F) << shift 2390 if b < 0x80 { 2391 break 2392 } 2393 } 2394 if msglen < 0 { 2395 return ErrInvalidLengthTypes 2396 } 2397 postIndex := iNdEx + msglen 2398 if postIndex < 0 { 2399 return ErrInvalidLengthTypes 2400 } 2401 if postIndex > l { 2402 return io.ErrUnexpectedEOF 2403 } 2404 v := &SignVoteRequest{} 2405 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2406 return err 2407 } 2408 m.Sum = &Message_SignVoteRequest{v} 2409 iNdEx = postIndex 2410 case 4: 2411 if wireType != 2 { 2412 return fmt.Errorf("proto: wrong wireType = %d for field SignedVoteResponse", wireType) 2413 } 2414 var msglen int 2415 for shift := uint(0); ; shift += 7 { 2416 if shift >= 64 { 2417 return ErrIntOverflowTypes 2418 } 2419 if iNdEx >= l { 2420 return io.ErrUnexpectedEOF 2421 } 2422 b := dAtA[iNdEx] 2423 iNdEx++ 2424 msglen |= int(b&0x7F) << shift 2425 if b < 0x80 { 2426 break 2427 } 2428 } 2429 if msglen < 0 { 2430 return ErrInvalidLengthTypes 2431 } 2432 postIndex := iNdEx + msglen 2433 if postIndex < 0 { 2434 return ErrInvalidLengthTypes 2435 } 2436 if postIndex > l { 2437 return io.ErrUnexpectedEOF 2438 } 2439 v := &SignedVoteResponse{} 2440 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2441 return err 2442 } 2443 m.Sum = &Message_SignedVoteResponse{v} 2444 iNdEx = postIndex 2445 case 5: 2446 if wireType != 2 { 2447 return fmt.Errorf("proto: wrong wireType = %d for field SignProposalRequest", wireType) 2448 } 2449 var msglen int 2450 for shift := uint(0); ; shift += 7 { 2451 if shift >= 64 { 2452 return ErrIntOverflowTypes 2453 } 2454 if iNdEx >= l { 2455 return io.ErrUnexpectedEOF 2456 } 2457 b := dAtA[iNdEx] 2458 iNdEx++ 2459 msglen |= int(b&0x7F) << shift 2460 if b < 0x80 { 2461 break 2462 } 2463 } 2464 if msglen < 0 { 2465 return ErrInvalidLengthTypes 2466 } 2467 postIndex := iNdEx + msglen 2468 if postIndex < 0 { 2469 return ErrInvalidLengthTypes 2470 } 2471 if postIndex > l { 2472 return io.ErrUnexpectedEOF 2473 } 2474 v := &SignProposalRequest{} 2475 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2476 return err 2477 } 2478 m.Sum = &Message_SignProposalRequest{v} 2479 iNdEx = postIndex 2480 case 6: 2481 if wireType != 2 { 2482 return fmt.Errorf("proto: wrong wireType = %d for field SignedProposalResponse", wireType) 2483 } 2484 var msglen int 2485 for shift := uint(0); ; shift += 7 { 2486 if shift >= 64 { 2487 return ErrIntOverflowTypes 2488 } 2489 if iNdEx >= l { 2490 return io.ErrUnexpectedEOF 2491 } 2492 b := dAtA[iNdEx] 2493 iNdEx++ 2494 msglen |= int(b&0x7F) << shift 2495 if b < 0x80 { 2496 break 2497 } 2498 } 2499 if msglen < 0 { 2500 return ErrInvalidLengthTypes 2501 } 2502 postIndex := iNdEx + msglen 2503 if postIndex < 0 { 2504 return ErrInvalidLengthTypes 2505 } 2506 if postIndex > l { 2507 return io.ErrUnexpectedEOF 2508 } 2509 v := &SignedProposalResponse{} 2510 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2511 return err 2512 } 2513 m.Sum = &Message_SignedProposalResponse{v} 2514 iNdEx = postIndex 2515 case 7: 2516 if wireType != 2 { 2517 return fmt.Errorf("proto: wrong wireType = %d for field PingRequest", wireType) 2518 } 2519 var msglen int 2520 for shift := uint(0); ; shift += 7 { 2521 if shift >= 64 { 2522 return ErrIntOverflowTypes 2523 } 2524 if iNdEx >= l { 2525 return io.ErrUnexpectedEOF 2526 } 2527 b := dAtA[iNdEx] 2528 iNdEx++ 2529 msglen |= int(b&0x7F) << shift 2530 if b < 0x80 { 2531 break 2532 } 2533 } 2534 if msglen < 0 { 2535 return ErrInvalidLengthTypes 2536 } 2537 postIndex := iNdEx + msglen 2538 if postIndex < 0 { 2539 return ErrInvalidLengthTypes 2540 } 2541 if postIndex > l { 2542 return io.ErrUnexpectedEOF 2543 } 2544 v := &PingRequest{} 2545 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2546 return err 2547 } 2548 m.Sum = &Message_PingRequest{v} 2549 iNdEx = postIndex 2550 case 8: 2551 if wireType != 2 { 2552 return fmt.Errorf("proto: wrong wireType = %d for field PingResponse", wireType) 2553 } 2554 var msglen int 2555 for shift := uint(0); ; shift += 7 { 2556 if shift >= 64 { 2557 return ErrIntOverflowTypes 2558 } 2559 if iNdEx >= l { 2560 return io.ErrUnexpectedEOF 2561 } 2562 b := dAtA[iNdEx] 2563 iNdEx++ 2564 msglen |= int(b&0x7F) << shift 2565 if b < 0x80 { 2566 break 2567 } 2568 } 2569 if msglen < 0 { 2570 return ErrInvalidLengthTypes 2571 } 2572 postIndex := iNdEx + msglen 2573 if postIndex < 0 { 2574 return ErrInvalidLengthTypes 2575 } 2576 if postIndex > l { 2577 return io.ErrUnexpectedEOF 2578 } 2579 v := &PingResponse{} 2580 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2581 return err 2582 } 2583 m.Sum = &Message_PingResponse{v} 2584 iNdEx = postIndex 2585 default: 2586 iNdEx = preIndex 2587 skippy, err := skipTypes(dAtA[iNdEx:]) 2588 if err != nil { 2589 return err 2590 } 2591 if skippy < 0 { 2592 return ErrInvalidLengthTypes 2593 } 2594 if (iNdEx + skippy) < 0 { 2595 return ErrInvalidLengthTypes 2596 } 2597 if (iNdEx + skippy) > l { 2598 return io.ErrUnexpectedEOF 2599 } 2600 iNdEx += skippy 2601 } 2602 } 2603 2604 if iNdEx > l { 2605 return io.ErrUnexpectedEOF 2606 } 2607 return nil 2608 } 2609 func skipTypes(dAtA []byte) (n int, err error) { 2610 l := len(dAtA) 2611 iNdEx := 0 2612 depth := 0 2613 for iNdEx < l { 2614 var wire uint64 2615 for shift := uint(0); ; shift += 7 { 2616 if shift >= 64 { 2617 return 0, ErrIntOverflowTypes 2618 } 2619 if iNdEx >= l { 2620 return 0, io.ErrUnexpectedEOF 2621 } 2622 b := dAtA[iNdEx] 2623 iNdEx++ 2624 wire |= (uint64(b) & 0x7F) << shift 2625 if b < 0x80 { 2626 break 2627 } 2628 } 2629 wireType := int(wire & 0x7) 2630 switch wireType { 2631 case 0: 2632 for shift := uint(0); ; shift += 7 { 2633 if shift >= 64 { 2634 return 0, ErrIntOverflowTypes 2635 } 2636 if iNdEx >= l { 2637 return 0, io.ErrUnexpectedEOF 2638 } 2639 iNdEx++ 2640 if dAtA[iNdEx-1] < 0x80 { 2641 break 2642 } 2643 } 2644 case 1: 2645 iNdEx += 8 2646 case 2: 2647 var length int 2648 for shift := uint(0); ; shift += 7 { 2649 if shift >= 64 { 2650 return 0, ErrIntOverflowTypes 2651 } 2652 if iNdEx >= l { 2653 return 0, io.ErrUnexpectedEOF 2654 } 2655 b := dAtA[iNdEx] 2656 iNdEx++ 2657 length |= (int(b) & 0x7F) << shift 2658 if b < 0x80 { 2659 break 2660 } 2661 } 2662 if length < 0 { 2663 return 0, ErrInvalidLengthTypes 2664 } 2665 iNdEx += length 2666 case 3: 2667 depth++ 2668 case 4: 2669 if depth == 0 { 2670 return 0, ErrUnexpectedEndOfGroupTypes 2671 } 2672 depth-- 2673 case 5: 2674 iNdEx += 4 2675 default: 2676 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 2677 } 2678 if iNdEx < 0 { 2679 return 0, ErrInvalidLengthTypes 2680 } 2681 if depth == 0 { 2682 return iNdEx, nil 2683 } 2684 } 2685 return 0, io.ErrUnexpectedEOF 2686 } 2687 2688 var ( 2689 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 2690 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 2691 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 2692 )