You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2648 lines
62 KiB

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